From 040c25aac676405863d6ecd9f9c3999470306606 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Tue, 3 Feb 2026 14:26:11 +0100 Subject: [PATCH] Add CI workflow for building and releasing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds all 6 variants (3 platforms × 2 build types) on push to main. Fetches APK from private repo using deploy key. 💘 Generated with Crush Assisted-by: Claude Opus 4.5 via Crush --- .forgejo/workflows/release.yml | 62 ++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .forgejo/workflows/release.yml diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml new file mode 100644 index 0000000..9933f01 --- /dev/null +++ b/.forgejo/workflows/release.yml @@ -0,0 +1,62 @@ +name: Build and Release + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "10.0.x" + + - name: Fetch APK from private repo + run: | + mkdir -p ~/.ssh + echo "${{ secrets.APK_DEPLOY_KEY }}" > ~/.ssh/apk_key + chmod 600 ~/.ssh/apk_key + GIT_SSH_COMMAND="ssh -i ~/.ssh/apk_key -o StrictHostKeyChecking=no" \ + git clone --depth 1 git@git.amarth.cloud:chris/.files.git apk-repo + mv apk-repo/delver.apk . + rm -rf apk-repo ~/.ssh/apk_key + + - name: Build all platforms + run: | + # Windows + dotnet publish -c Release -r win-x64 -o dist/win-x64/standard + dotnet publish -c Release -r win-x64 -p:EmbeddedApk=delver.apk -o dist/win-x64/embedded + # Linux + dotnet publish -c Release -r linux-x64 -o dist/linux-x64/standard + dotnet publish -c Release -r linux-x64 -p:EmbeddedApk=delver.apk -o dist/linux-x64/embedded + # macOS + dotnet publish -c Release -r osx-x64 -o dist/osx-x64/standard + dotnet publish -c Release -r osx-x64 -p:EmbeddedApk=delver.apk -o dist/osx-x64/embedded + + - name: Package binaries + run: | + mkdir -p release + # Standard builds + cp dist/win-x64/standard/Scry.exe release/scry-win-x64.exe + cp dist/linux-x64/standard/Scry release/scry-linux-x64 + cp dist/osx-x64/standard/Scry release/scry-osx-x64 + # Embedded builds + cp dist/win-x64/embedded/Scry.exe release/scry-embedded-win-x64.exe + cp dist/linux-x64/embedded/Scry release/scry-embedded-linux-x64 + cp dist/osx-x64/embedded/Scry release/scry-embedded-osx-x64 + # Make Linux/macOS binaries executable + chmod +x release/scry-linux-x64 release/scry-osx-x64 + chmod +x release/scry-embedded-linux-x64 release/scry-embedded-osx-x64 + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + files: release/* + generate_release_notes: true