Some checks failed
Build and Release / build (push) Failing after 24s
Match runner's NixOS environment.
💘 Generated with Crush
Assisted-by: Claude Opus 4.5 via Crush <crush@charm.land>
62 lines
2.3 KiB
YAML
62 lines
2.3 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.dotnet-sdk_9 nixpkgs.openssh nixpkgs.git
|
|
|
|
- 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: |
|
|
# 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 }}
|