add links in release description #6
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: Rolling Release | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| workflow_dispatch: | |
| env: | |
| ROLLING_TAG: "ypp-rolling" | |
| ROLLING_NAME: "Yellow++ Rolling Release" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y bison gcc git make libpng-dev | |
| - name: Checkout RGBDS | |
| uses: actions/checkout@v4 | |
| with: | |
| path: rgbds | |
| ref: v1.0.0 | |
| repository: gbdev/rgbds | |
| - name: Install RGBDS | |
| working-directory: rgbds | |
| run: sudo make install | |
| - name: Remove RGBDS folder | |
| run: rm -rf rgbds | |
| - name: Set SHORT_SHA | |
| run: echo "SHORT_SHA=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV | |
| - name: Build ROMs | |
| run: | | |
| make clean || true | |
| make | |
| # Rename debug ROM and symbol files | |
| cp pokeyellow.gbc ypp_latest.gbc # convenience copy for download badge | |
| mv pokeyellow.gbc "ypp_${SHORT_SHA}.gbc" | |
| mv pokeyellow_debug.gbc "ypp_${SHORT_SHA}_debug.gbc" | |
| mv pokeyellow.sym "ypp_${SHORT_SHA}.sym" | |
| mv pokeyellow_debug.sym "ypp_${SHORT_SHA}_debug.sym" | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ypp-build | |
| path: . | |
| retention-days: 7 | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Load SHORT_SHA | |
| run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ypp-build | |
| path: . | |
| - name: Generate changelog | |
| id: changelog | |
| run: | | |
| git fetch --tags | |
| PREV_TAG=$(git tag --sort=-creatordate | grep ypp-rolling | head -n 1) | |
| if [ -z "$PREV_TAG" ]; then | |
| LOG="- Initial build" | |
| else | |
| LOG=$(git log --pretty=format:"- [%h](https://github.com/${GITHUB_REPOSITORY}/commit/%H) %s" ${PREV_TAG}..HEAD) | |
| [ -z "$LOG" ] && LOG="- No changes" | |
| fi | |
| # Multi-line output for GitHub Actions | |
| echo "changes<<EOF" >> $GITHUB_OUTPUT | |
| echo "$LOG" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Delete previous rolling release | |
| uses: cb80/delrel@latest | |
| with: | |
| tag: ${{ env.ROLLING_TAG }} | |
| - name: Update rolling tag | |
| run: | | |
| git tag -f ${{ env.ROLLING_TAG }} | |
| git push -f https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git ${{ env.ROLLING_TAG }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create prerelease | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ env.ROLLING_TAG }} | |
| name: "${{ env.ROLLING_NAME }}" | |
| body: | | |
| ## Build: ${{ env.SHORT_SHA }} | |
| ### **ROM to play:** [`ypp_latest.gbc`](https://github.com/mirko93s/yellowplusplus/releases/download/ypp-rolling/ypp_latest.gbc) | |
| **Debug/testing files:** | |
| - `ypp_${{ env.SHORT_SHA }}.gbc` (same as ypp_latest.gbc) | |
| - `ypp_${{ env.SHORT_SHA }}_debug.gbc` (rom for testing/debugging, **NOT** intended for regular play!) | |
| - `ypp_${{ env.SHORT_SHA }}.sym` | |
| - `ypp_${{ env.SHORT_SHA }}_debug.sym` | |
| **Changelog since last rolling build:** | |
| ${{ steps.changelog.outputs.changes }} | |
| prerelease: true | |
| draft: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SHORT_SHA: ${{ env.SHORT_SHA }} | |
| - name: Upload ROM and symbol files | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ env.ROLLING_TAG }} | |
| files: | | |
| ypp_latest.gbc | |
| ypp_${{ env.SHORT_SHA }}.gbc | |
| ypp_${{ env.SHORT_SHA }}_debug.gbc | |
| ypp_${{ env.SHORT_SHA }}.sym | |
| ypp_${{ env.SHORT_SHA }}_debug.sym |