Add CI workflow for building and releasing
Some checks are pending
Build and Release / build (push) Waiting to run
Some checks are pending
Build and Release / build (push) Waiting to run
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 <crush@charm.land>
This commit is contained in:
parent
fb266af3e5
commit
040c25aac6
1 changed files with 62 additions and 0 deletions
62
.forgejo/workflows/release.yml
Normal file
62
.forgejo/workflows/release.yml
Normal file
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue