scry/.forgejo/workflows/release.yml
Chris Kruining 96c8687a17
Some checks failed
Build and Release / build (push) Failing after 16s
Remove SSH test - deploy keys only work with actual clone
💘 Generated with Crush

Assisted-by: Claude Opus 4.5 via Crush <crush@charm.land>
2026-02-03 15:29:29 +01:00

65 lines
2.4 KiB
YAML

name: Build and Release
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: default
steps:
- name: Install dependencies
run: |
nix-env -iA nixpkgs.nodejs nixpkgs.openssh nixpkgs.curl nixpkgs.dotnetCorePackages.sdk_10_0-bin
dotnet --version
- name: Checkout
uses: actions/checkout@v4
- 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: |
export PATH="$HOME/.dotnet:$PATH"
# 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: https://code.forgejo.org/actions/forgejo-release@v2
with:
direction: upload
release-dir: release
release-notes: "Automated release from CI"
tag: ${{ github.run_number }}