fix(ci): require release tags on main#8
Merged
Conversation
Reject tag pushes whose commit is not on origin/main, and document that releases must be tagged from main after merge. Co-authored-by: Cursor <cursoragent@cursor.com>
Only allow tag pushes when the tagged commit matches origin/main HEAD, not merely an ancestor commit on main. Co-authored-by: Cursor <cursoragent@cursor.com>
a01sa01to
reviewed
Jun 8, 2026
Comment on lines
+7
to
+8
| permissions: | ||
| contents: write | ||
| contents: read |
Member
There was a problem hiding this comment.
jobs で指定してるならここいらない?
もしくは今後ほかの jobs 追加しないならここ write のまま L14, 15 削除するか
Comment on lines
+26
to
+27
| echo "::error::Release tag must point to the current origin/main HEAD (${main_head})." | ||
| echo "::error::Got ${GITHUB_SHA}. Merge to main, pull main, then tag the latest commit." |
Member
There was a problem hiding this comment.
これ 2 つの別々のエラーとして表示されそう (そういう想定ならいいけど)
Drop redundant workflow-level permissions and combine tag validation errors into a single annotation. Co-authored-by: Cursor <cursoragent@cursor.com>
a01sa01to
approved these changes
Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
どういう変更か
origin/main上にあること」を検証するステップを追加docs/how-to/release.mdに feature branch から tag を push しない旨と、検証失敗時の対処を追記なぜ変更するのか
metrics-exporter-v0.1.0が main 未 merge の branch から tag push され、GitHub Release が誤って公開されていた追加の情報
metrics-exporter-v0.1.0の GitHub Release と remote tag は本 PR 作業時に削除済みMade with Cursor