Add Gitea Actions: CI tests and package release workflow
CI / test (push) Successful in 1m23s

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-20 20:04:41 +03:00
co-authored by Claude Sonnet 5
parent 8f42dc690e
commit 5d9c39901c
2 changed files with 51 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
name: Release
on:
push:
tags: ['v*.*.*']
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: make dist VERSION=${GITEA_REF_NAME#v}
env:
GITEA_REF_NAME: ${{ gitea.ref_name }}
- name: Publish to package registry
env:
VERSION: ${{ gitea.ref_name }}
TOKEN: ${{ secrets.PACKAGE_TOKEN }}
BASE: ${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/hotpcalc
run: |
set -e
for f in dist/*; do
name=$(basename "$f")
echo "upload: $name"
curl -fsSL -H "Authorization: token ${TOKEN}" \
--upload-file "$f" \
"${BASE}/${VERSION#v}/${name}"
done