Update compilation.yml #207
This file contains hidden or 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 | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| repository_dispatch: | |
| types: [run_build] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: ps2dev/ps2dev:v1.2.0 | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| apk add build-base git zip | |
| - uses: actions/checkout@v3 | |
| - run: | | |
| git fetch --prune --unshallow | |
| - name: Compile | |
| run: | | |
| make | |
| - name: Get short SHA | |
| id: slug | |
| run: | | |
| echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV | |
| - name: Rename and move ELF to workspace | |
| run: | | |
| mv Installer.elf "$GITHUB_WORKSPACE/UMCS-OPENTUNA-${{ env.sha8 }}.ELF" | |
| - name: Zip ELF with README and CHANGELOG into workspace | |
| run: | | |
| cd "$GITHUB_WORKSPACE" | |
| zip UMCS-OPENTUNA-${{ env.sha8 }}.zip \ | |
| UMCS-OPENTUNA-${{ env.sha8 }}.ELF \ | |
| README.md \ | |
| CHANGELOG.md | |
| - name: Upload artifacts | |
| if: ${{ success() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: UMCS-OPENTUNA-${{ env.sha8 }} | |
| path: | | |
| UMCS-OPENTUNA-${{ env.sha8 }}.ELF | |
| UMCS-OPENTUNA-${{ env.sha8 }}.zip | |
| - name: Debug - Check output files | |
| run: | | |
| ls -lah "$GITHUB_WORKSPACE"/UMCS-OPENTUNA-${{ env.sha8 }}.* | |
| - name: Create release | |
| if: github.ref == 'refs/heads/UMCS-OpenTuna' | |
| uses: marvinpinto/action-automatic-releases@latest | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| automatic_release_tag: "UMCS-OPENTUNA-${{ env.sha8 }}" | |
| title: "UMCS: OpenTuna Installer w/PS2BBL - AIO (build ${{ env.sha8 }})" | |
| files: | | |
| UMCS-OPENTUNA-${{ env.sha8 }}.ELF | |
| UMCS-OPENTUNA-${{ env.sha8 }}.zip |