ci: release only tags on main
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / image (pull_request) Successful in 5m17s
ci / lint (pull_request) Successful in 7m13s
ci / build (pull_request) Successful in 9m7s
ci / test (pull_request) Successful in 12m58s
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / image (pull_request) Successful in 5m17s
ci / lint (pull_request) Successful in 7m13s
ci / build (pull_request) Successful in 9m7s
ci / test (pull_request) Successful in 12m58s
Only code that reached main through a protected merge is released, the release workflow included: a tag on any other commit, such as one with a changed workflow, publishes nothing. Together with the tag protection that leaves v* tags to the Owners team. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
d2d6bf9f44
commit
f278b66efb
1 file changed
+13
-3
@@ -1,7 +1,8 @@
|
|||||||
name: release
|
name: release
|
||||||
|
|
||||||
# Runs for release tags, which `make release` creates. The image of a tag
|
# Runs for release tags, which `make release` creates. Only the Owners team
|
||||||
# is built by the ci workflow.
|
# 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:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: ["v*"]
|
tags: ["v*"]
|
||||||
@@ -20,7 +21,16 @@ jobs:
|
|||||||
curl -fsSL "https://go.dev/dl/go${v}.linux-amd64.tar.gz" | tar -C /usr/local -xz
|
curl -fsSL "https://go.dev/dl/go${v}.linux-amd64.tar.gz" | tar -C /usr/local -xz
|
||||||
echo /usr/local/go/bin >> "$GITHUB_PATH"
|
echo /usr/local/go/bin >> "$GITHUB_PATH"
|
||||||
- name: Check tag
|
- 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
|
- name: Build frontend
|
||||||
run: npm ci --no-audit --no-fund && npm run build
|
run: npm ci --no-audit --no-fund && npm run build
|
||||||
- name: Build binaries
|
- name: Build binaries
|
||||||
|
|||||||
Reference in new issue
Block a user