Files
anchorage/.gitea/workflows/release.yml
T
57_Wolve ee52ae985d
Security / Vulnerability Check (push) Failing after 16m47s
Test / Build & Unit Tests (push) Failing after 4m58s
Test / Integration Tests (push) Has been skipped
Test / Lint (push) Failing after 23s
ci: gitea actions — test, security, release
Three workflows modeled on kanrisha + Vortex:

* test.yml — on push/PR to main: build + vet + unit tests (-race), a
  gated integration job that runs go test -tags=integration ./test/...
  (testcontainers spins up Postgres 17 itself; runner must expose the
  docker socket), and a lint job (go mod tidy + gofmt check).
* security.yml — govulncheck on push to main plus a weekly Monday
  06:00 UTC cron so fresh CVEs surface without a code change.
* release.yml — on v* tag push only: goreleaser v2 with
  GORELEASER_FORCE_TOKEN=gitea + GITEA_SERVER_URL, plus a docker
  login step so the built image can push to Gitea's registry.

All three pin Go 1.26 (go.mod says 1.26.2). Release job requires the
TOKEN_GITEA repo secret (scope: packages + code:write).
2026-04-16 18:16:13 -05:00

48 lines
1.3 KiB
YAML

name: Release
on:
push:
tags:
- 'v*'
env:
GITEA_TOKEN: ${{ secrets.TOKEN_GITEA }}
jobs:
goreleaser:
name: Build & Publish Release
runs-on: ubuntu-latest
# Only run when a v* tag is pushed — goreleaser handles the tag →
# release mapping, and we never want main-branch pushes to tag.
if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# goreleaser needs full history + tags for changelog + version
# derivation.
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: git.anomalous.dev
username: ${{ github.repository_owner }}
password: ${{ secrets.TOKEN_GITEA }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
env:
GITEA_TOKEN: ${{ secrets.TOKEN_GITEA }}
GITEA_SERVER_URL: https://git.anomalous.dev
GORELEASER_FORCE_TOKEN: gitea