MechaPwn 3.0 #175
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI-compile | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
name: MechaPwn compilation | |
runs-on: ubuntu-latest | |
container: ps2dev/ps2dev:latest | |
# instead of "ps2dev/ps2dev:latest" you can use different tags, for example for old projects you can use "ps2dev/ps2dev:v1.0" | |
steps: | |
- name: Install dependencies | |
run: | | |
apk add build-base git zip python3 py3-pip | |
apk add tiff-dev jpeg-dev openjpeg-dev zlib-dev freetype-dev lcms2-dev libwebp-dev tcl-dev tk-dev harfbuzz-dev fribidi-dev libimagequant-dev libxcb-dev libpng-dev | |
pip3 install --upgrade pip setuptools wheel | |
pip3 install Pillow | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Compile project | |
run: | | |
make | |
# commands for compiling your project | |
- name: Get short SHA | |
id: slug | |
run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT | |
- name: Upload artifacts | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: MechaPwn-${{ steps.slug.outputs.sha8 }} | |
path: MechaPwn_pck.elf | |
if-no-files-found: error | |
# 'path' will create artifact with all *.elf in working directory | |
# you can change this | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get short SHA | |
id: slug | |
run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: MechaPwn-${{ steps.slug.outputs.sha8 }} | |
path: MechaPwn | |
- name: Prepare MechaPwn archive | |
run: 7z a MechaPwn-${{ steps.slug.outputs.sha8 }}.7z MechaPwn/* | |
- name: Create pre-release | |
if: github.ref == 'refs/heads/master' | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: true | |
automatic_release_tag: latest | |
title: Development build | |
files: MechaPwn-${{ steps.slug.outputs.sha8 }}.7z | |
- name: Create Tagged Release Draft | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: false | |
draft: true | |
automatic_release_tag: RenameMe | |
files: MechaPwn-${{ steps.slug.outputs.sha8 }}.7z |