File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push : # Note: will run on tags push too
5+ pull_request :
6+ workflow_dispatch : # manual run
7+ workflow_call :
8+ outputs :
9+ VERSTRING :
10+ description : Version string
11+ value : ${{ jobs.build.outputs.VERSTRING }}
12+
13+ jobs :
14+ build :
15+ name : Build boot.3dsx
16+ runs-on : ubuntu-latest
17+ outputs :
18+ VERSTRING : ${{ steps.verstring.outputs.VERSTRING }}
19+ container :
20+ image : devkitpro/devkitarm
21+ options : --user 1001 # runner user, for git safedir
22+ steps :
23+ - name : Checkout repo
24+ uses : actions/checkout@v4
25+ with :
26+ submodules : recursive # we currently don't use submodules, but just in case...
27+ fetch-depth : 0 # deep clone (for git describe)
28+ fetch-tags : true
29+ - name : Set version string
30+ id : verstring
31+ run : |
32+ VERSTRING=$(git describe --tags --match "v[0-9]*" --abbrev=7 | sed 's/-[0-9]*-g/-/')
33+ echo "VERSTRING=$VERSTRING" | tee -a $GITHUB_OUTPUT
34+ - name : Build
35+ run : make -j$(nproc --all)
36+ - name : Publish boot.3dsx (only on manual run or release)
37+ if : github.event_name == 'workflow_dispatch' || github.event_name == 'release'
38+ uses : actions/upload-artifact@v4
39+ with :
40+ # This produces a zip with boot.3dsx inside for security reasons
41+ # For publish_release this is presented as boot.3dsx however
42+ name : 3ds-hbmenu-${{ steps.verstring.outputs.VERSTRING }}
43+ path : boot.3dsx
Original file line number Diff line number Diff line change 1+ name : Release CI
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ build :
9+ name : Build boot.3dsx
10+ uses : ./.github/workflows/build.yaml
11+ publish_release :
12+ name : Publish release archive
13+ needs : build
14+ runs-on : ubuntu-latest
15+ env :
16+ VERSTRING : ${{ needs.build.outputs.VERSTRING }}
17+ steps :
18+ - name : Download cacert.pem
19+ run : mkdir -p config/ssl && curl -sSfL "https://curl.se/ca/cacert.pem" -o config/ssl/cacert.pem
20+ - name : Download build artifact from previous job
21+ uses : actions/download-artifact@v4
22+ with :
23+ name : 3ds-hbmenu-${{ env.VERSTRING }}
24+ - name : Bundle release archive
25+ run : zip "3ds-hbmenu-$VERSTRING.zip" -r config boot.3dsx
26+ - name : Publish release archive
27+ uses : softprops/action-gh-release@v1
28+ if : startsWith(github.ref, 'refs/tags/')
29+ with :
30+ files : " ./3ds-hbmenu-${{ env.VERSTRING }}.zip"
31+ env :
32+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 11. * /
2+ ! .github /
23build /
34* .t3x
45* .3dsx
You can’t perform that action at this time.
0 commit comments