MechaPwn 3.0 #210
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: ghcr.io/ps2homebrew/ps2homebrew:main | |
# ghcr.io/ps2homebrew/ps2homebrew@sha256:9cf3f8497e5a49e3a08cdf96aa9a5b97f119d554e21e3925b3cc84485846b3ce | |
# 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 py3-pillow | |
- uses: actions/checkout@v4 | |
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@v4 | |
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' || github.ref == 'refs/heads/LangPwn' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get short SHA | |
id: slug | |
run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
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' || github.ref == 'refs/heads/LangPwn' | |
uses: mathieucarbou/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: mathieucarbou/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 |