Files
rollcall/.gitea/workflows/release.yml
T
ilkerandClaude Fable 5.1 d9ae89b295
CI / agent (push) Successful in 3s
CI / site (push) Successful in 2s
CI / go (push) Successful in 1m15s
Rollcall: bare-metal commissioning server, agent, image build, lab and CI
Go server (API, embedded web UI, CLI) backed by PostgreSQL with AES-GCM
sealed BMC secrets; Debian live commissioning agent and live-build recipe;
Proxmox lab with pve-vbmc virtual BMCs; Gitea workflows for CI, releases
and deployment; project website.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-27 01:29:53 +01:00

44 lines
1.6 KiB
YAML

# Tag v* -> build static binaries and publish them as a Gitea release.
name: release
on:
push:
tags: ['v*']
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: cmd/rollcall/go.mod
cache-dependency-path: cmd/rollcall/go.sum
- name: Build
working-directory: cmd/rollcall
run: |
set -eu
for arch in amd64 arm64; do
CGO_ENABLED=0 GOOS=linux GOARCH=$arch go build -trimpath \
-ldflags="-s -w -X main.version=${GITHUB_REF_NAME}" -o rollcall-linux-$arch .
done
sha256sum rollcall-linux-* > SHA256SUMS
- name: Create release and upload assets
env:
API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
working-directory: cmd/rollcall
run: |
set -eu
body=$(printf '{"tag_name":"%s","name":"%s","draft":false,"prerelease":false}' "$TAG" "$TAG")
id=$(curl -sfS -X POST -H "Authorization: token $TOKEN" -H "Content-Type: application/json" \
-d "$body" "$API/releases" | python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])')
for f in rollcall-linux-amd64 rollcall-linux-arm64 SHA256SUMS; do
curl -sfS -X POST -H "Authorization: token $TOKEN" \
-F "attachment=@$f" "$API/releases/$id/assets?name=$f" >/dev/null
echo "uploaded $f"
done