Files
ExecuteR/.gitea/workflows/release.yml
T
gsadmin 1ff1a2273e CI builds every platform binary: agent x5 RIDs, standalone server x2
Package-Agent gains -Runtimes and picks the right flavor per RID
(net10.0-windows for win, portable net10.0 elsewhere) — this also fixes
publishing after the multi-targeting change, which requires an explicit
framework. Unix binaries ship as executer-agent; the MSI still harvests
the win-x64 output.

CI packages the agent for win-x64/linux-x64/linux-arm64/osx-x64/
osx-arm64 plus the combined standalone server (win-x64, linux-x64) and
uploads everything as a "binaries" artifact with checksums. Releases
attach the same set (Server zips included), and the release workflow
sets up Node 22 for the static WebUI build the server bundle needs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 20:02:18 -04:00

72 lines
2.6 KiB
YAML

name: Release
on:
push:
branches: [main]
jobs:
agent-artifacts:
# Publishes the self-contained agent for every platform, the MSI, the
# combined standalone server (win/linux) and checksums, then attaches them
# to a Gitea release for the unified version.
# Label must match a registered runner: windows-host.
runs-on: windows-host
steps:
# SHA-256 repo: plain git clone (actions/checkout inits SHA-1 and
# cannot fetch from a SHA-256 server).
- name: Checkout
shell: pwsh
env:
CHECKOUT_TOKEN: ${{ github.token }}
run: |
$ErrorActionPreference = 'Stop'
Get-ChildItem -Force | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
$url = '${{ github.server_url }}/${{ github.repository }}.git' -replace '^https://', "https://x-access-token:$env:CHECKOUT_TOKEN@"
git clone --depth 1 --branch '${{ github.ref_name }}' $url .
git log -1 --format='%H %s'
- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Setup Node
uses: actions/setup-node@v4
with:
# @nats-io/* packages require Node >= 22 (static WebUI build).
node-version: '22'
- name: Compute unified version
id: ver
shell: pwsh
run: |
$v = & ./scripts/Get-UnifiedVersion.ps1
"version=$v" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
- name: Generate icon
shell: pwsh
run: ./scripts/Generate-Icons.ps1
- name: Package agent (all platforms + MSI + checksums)
shell: pwsh
run: |
./scripts/Package-Agent.ps1 -Version ${{ steps.ver.outputs.version }} `
-Runtimes win-x64,linux-x64,linux-arm64,osx-x64,osx-arm64 -SkipIcon
- name: Package server (win-x64 + linux-x64)
shell: pwsh
run: ./scripts/Package-Server.ps1 -Version ${{ steps.ver.outputs.version }} -SkipIcon
- name: Create Gitea release and upload assets
shell: pwsh
env:
# GITEA_TOKEN is injected automatically by Gitea Actions; SERVER_URL
# is seeded by scripts/Initialize-GiteaSecrets.ps1 and falls back to
# the instance URL the runner already knows.
GITEA_URL: ${{ vars.SERVER_URL || github.server_url }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_OWNER: ${{ github.repository_owner }}
GITEA_REPOSITORY: ${{ github.event.repository.name }}
VERSION: ${{ steps.ver.outputs.version }}
run: ./scripts/Publish-Release.ps1 -Version $env:VERSION