steal release script from xash3d-fwgs & update ci/cd #252
Workflow file for this run
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 & Deploy Goldleaf | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| name: "Build Goldleaf" | |
| runs-on: ubuntu-latest | |
| container: devkitpro/devkita64:latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Update packages | |
| run: | | |
| apt update | |
| apt upgrade -y patch autoconf automake diffutils pkgconf fakeroot git file tar bzip2 zstd python3 python3-pip python3-requests | |
| dkp-pacman --noconfirm -U \ | |
| "https://wii.leseratte10.de/devkitPro/other-stuff/dkp-toolchain-vars-1.0.2-1-any.pkg.tar.xz" | |
| - name: Silence all git safe directory warnings | |
| run: git config --system --add safe.directory '*' | |
| - name: Checkout latest libnx commit | |
| run: | | |
| git clone --recurse-submodules https://github.com/switchbrew/libnx.git | |
| - name: Set workspace permissions | |
| run: chmod 777 -R "$GITHUB_WORKSPACE" | |
| - name: Build and install libnx | |
| run: | | |
| cd libnx | |
| make install -j$(nproc) -l$(nproc) | |
| - name: Build libusbhsfs dependencies | |
| run: | | |
| make setup -j$(nproc) -l$(nproc) | |
| - name: Build Goldleaf | |
| run: | | |
| python3 arc/arc.py gen_db default+Goldleaf/include/res/res_Account.rc.hpp+Goldleaf/include/res/res_ETicket.rc.hpp+Goldleaf/include/res/res_NS.rc.hpp+Goldleaf/include/res/res_NFP.rc.hpp+Goldleaf/include/res/res_Goldleaf.rc.hpp | |
| python3 arc/arc.py gen_cpp rc GLEAF Goldleaf/include/res/res_Generated.gen.hpp | |
| make build -j$(nproc) -l$(nproc) | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| path: Goldleaf/Goldleaf.nro | |
| if-no-files-found: error | |
| release: | |
| name: "Publish release" | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| if: ${{ github.event_name == 'push' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Remove old release and upload new release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: bash ci-scripts/make_release.sh "${{ github.repository }}" "${{ github.ref_name }}" |