Batch upload to Tuna branch #244
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: Build [All] | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - 'installer/**' | |
| - 'installer_res/**' | |
| - '.github/workflows/compile-core.yml' | |
| schedule: | |
| - cron: "0 15 1 * *" | |
| jobs: | |
| build-packages: | |
| runs-on: ubuntu-latest | |
| container: ps2dev/ps2dev:v1.0 | |
| steps: | |
| - name: Install dependencies | |
| run: apk add --no-cache build-base git zip p7zip | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate build metadata | |
| run: | | |
| echo "SHA8=${GITHUB_SHA::8}" >> $GITHUB_ENV | |
| echo "BUILD_TS=$(date +'%Y-%m-%d_%H-%M-%S')" >> $GITHUB_ENV | |
| - name: Compile | |
| run: | | |
| make clean || true | |
| make | |
| - name: Prepare folder for Release | |
| run: | | |
| cd installer_res | |
| chmod +x ./pack.sh | |
| ./pack.sh | |
| mkdir -p ../release_artifacts | |
| mv ../FMCB-1966.7z ../release_artifacts/PS2-Exploits-Installer-${{ env.BUILD_TS }}.7z | |
| - name: Upload artifact | |
| if: success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: FMCB-${{ env.SHA8 }} | |
| path: release_artifacts/PS2-Exploits-Installer-${{ env.BUILD_TS }}.7z | |
| - name: Generate changelog since last tag | |
| id: changelog | |
| run: | | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| LAST_TAG=$(git describe --tags --abbrev=0 || echo "") | |
| echo "Last tag was: $LAST_TAG" | |
| LOG_BODY="" | |
| if [ -n "$LAST_TAG" ]; then | |
| LOG_BODY="$(git log $LAST_TAG..HEAD --pretty=format:"- %s (%h) by %an")" | |
| else | |
| LOG_BODY="$(git log --pretty=format:"- %s (%h) by %an")" | |
| fi | |
| echo 'RELEASE_BODY<<EOF' >> $GITHUB_ENV | |
| echo "$LOG_BODY" >> $GITHUB_ENV | |
| echo 'EOF' >> $GITHUB_ENV | |
| - name: Create release | |
| uses: marvinpinto/action-automatic-releases@latest | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| automatic_release_tag: "Tuna" | |
| prerelease: true | |
| title: "PS2 Exploits Installer" | |
| files: | | |
| release_artifacts/PS2-Exploits-Installer-${{ env.BUILD_TS }}.7z | |
| body: | | |
| ### Recent Changes: | |
| ${{ env.RELEASE_BODY }} |