Files
VeillaxandClaude Sonnet 5.5 8f01c6213f
CI / test (push) Successful in 1m56s
Docker / image (push) Successful in 1m56s
Add a Docker workflow that publishes multi-arch images
Pushes :edge for main and :x.y.z, :x.y and :latest for release tags,
optionally mirrored to another registry. The release workflow no longer
builds the image itself, so a tag does not publish it twice. The README
covers running the image anywhere and the settings the workflows read.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 23:13:54 -06:00

40 lines
1.2 KiB
YAML

name: Release
# Push a tag such as v0.2.0 to publish a release. The Docker workflow builds the image from the same tag:
# git tag -a v0.2.0 -m "spinner v0.2.0" && git push origin v0.2.0
on:
push:
tags: ['v*']
jobs:
release:
runs-on: ubuntu-latest
env:
GOPRIVATE: git.veillax.com
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # release notes come from the history since the previous tag
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Let Go fetch modules from this server
run: git config --global url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@git.veillax.com/".insteadOf "https://git.veillax.com/"
- name: Test
run: |
go vet ./...
go test ./...
- name: Build release archives
run: sh deploy/build.sh "${GITHUB_REF_NAME}"
# Optional secret RELEASE_TOKEN: an access token that can write releases, for
# servers where the automatic job token can't.
- name: Publish the release
env:
TOKEN: ${{ secrets.RELEASE_TOKEN || secrets.GITHUB_TOKEN }}
run: sh deploy/publish-release.sh "${GITHUB_REF_NAME}"