Merge pull request 'ci: release only tags on main' (#137) from ci/release-guard into main
ci / lint (push) Successful in 7m27s
ci / test (push) Failing after 14m14s
ci / build (push) Successful in 22m27s
ci / image (push) Successful in 4m17s

This commit was merged in pull request #137.
This commit is contained in:
Sebi committed 2026-11-23 18:37:26 +00:00
commit d99a19250b
1 file changed
+13 -3
+13 -3
View File
@@ -1,7 +1,8 @@
name: release
# Runs for release tags, which `make release` creates. The image of a tag
# is built by the ci workflow.
# Runs for release tags, which `make release` creates. Only the Owners team
# may push v* tags (tag protection), and only tags on main are released.
# The image of a tag is built by the ci workflow.
on:
push:
tags: ["v*"]
@@ -20,7 +21,16 @@ jobs:
curl -fsSL "https://go.dev/dl/go${v}.linux-amd64.tar.gz" | tar -C /usr/local -xz
echo /usr/local/go/bin >> "$GITHUB_PATH"
- name: Check tag
run: go run ./tools/release check "$GITHUB_REF_NAME"
run: |
go run ./tools/release check "$GITHUB_REF_NAME"
# Only code that reached main through a protected merge is
# released, this workflow included: a tag on any other commit,
# e.g. one with a changed workflow, publishes nothing.
git fetch -q origin main
if ! git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then
echo "::error::$GITHUB_REF_NAME does not point to a commit on main; not releasing."
exit 1
fi
- name: Build frontend
run: npm ci --no-audit --no-fund && npm run build
- name: Build binaries