From 30e89fee719f75de374e79e81df3c641b1fb4b03 Mon Sep 17 00:00:00 2001 From: Niklas Friesen Date: Mon, 30 Mar 2026 20:17:50 +0200 Subject: [PATCH] CI: GitHub Actions build with .nro artifact (GHES-compatible) - devkitpro/devkita64 container; apt install nodejs for actions/checkout. - upload-artifact@v3 (v4+ unsupported on GitHub Enterprise Server). - Push/PR to main and master; workflow_dispatch. - Makefile: TARGET_VERSION 1.0.0. Made-with: Cursor --- .github/workflows/build.yml | 41 +++++++++++++++++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..485942d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,41 @@ +name: Build + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + workflow_dispatch: + +jobs: + switch: + name: Build + runs-on: ubuntu-latest + container: + # Switch homebrew uses devkitA64 + libnx (not devkitARM) + image: devkitpro/devkita64:latest + permissions: + contents: read + + steps: + # actions/checkout needs Node; devkitPro images omit it by default + - name: Install dependencies + run: apt-get update && apt-get install -y nodejs + + - name: Checkout + uses: actions/checkout@v4 + with: + clean: true + + - name: Compile (Switch .nro) + env: + DEVKITPRO: /opt/devkitpro + run: make -j$(nproc) + + # v3: GHES does not support upload-artifact v4+ (artifact v2 backend) + - name: Upload .nro artifact + uses: actions/upload-artifact@v3 + with: + name: swr-ini-tool + path: swr-ini-tool.nro + if-no-files-found: error diff --git a/Makefile b/Makefile index 8c9bf74..c3cdb93 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ APP_RESOURCES := romfs:/ #--------------------------------------------------------------------------------- # version control constants #--------------------------------------------------------------------------------- -TARGET_VERSION := 0.1.0 +TARGET_VERSION := 1.0.0 APP_VERSION := $(TARGET_VERSION) #---------------------------------------------------------------------------------