Repository navigation
Fail the auto-tag job when a release can't be tagged - #10
Merged
Merged
Conversation
When RELEASE_PAT is unset, the tag step emitted a ::warning:: and exited 0, so the run went green while no tag was pushed and nothing published. That is how extensions 0.8.0 sat unpublished from 2026-08-31 until it was superseded by 0.8.1 without anyone noticing: pub.dev still serves 0.7.1, the repo has no tags at all, and every "Auto-tag releases" run reports success. A missing PAT with an unpublished version is now an ::error:: and a non-zero exit. Both packages are still checked before failing, so one missing secret doesn't hide the second package, and the blocked releases are written to the job summary with the two ways to fix it -- add the secret and re-run, or push the listed tags by hand. Unchanged: versions already on pub.dev are skipped, an existing tag is left alone, and a set PAT tags and pushes exactly as before. A pubspec with no version line stays a warning, since that is a malformed file rather than a blocked release. Verified by extracting the step's script and running it as CI does: with RELEASE_PAT empty against the current pubspecs it exits 1 and lists extensions-v0.8.1 and extensions_flutter-v0.6.0; against versions already on pub.dev it exits 0 and writes no summary. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P889JtFvr4ypqnHYQZCPag
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.
The bug
auto-tag.ymlhandled a missingRELEASE_PATwithecho "::warning::…"; continue, so the job exited 0 and the run showed green while no tag was pushed and nothing published.That is not hypothetical — it has been happening since the release plumbing landed:
extensionsextensions_flutterThe repo has zero tags.
extensions0.8.0 was merged on 2026-08-31, never published, and has now been superseded by 0.8.1 without ever shipping. Both "Auto-tag releases" runs —33446064509(0.8.0) and35623011460(0.8.1) — report success. From the latter's log:Warnings on a green run are invisible in practice. A release that silently doesn't happen is worse than one that fails.
The change
A missing PAT with an unpublished version is now an
::error::and a non-zero exit. Both packages are still evaluated before failing, so one missing secret doesn't mask the second package, and the blocked releases go to the job summary with both remedies:Unchanged: versions already on pub.dev are skipped, an existing tag is left alone, and a configured PAT tags and pushes exactly as before. A pubspec with no
version:line stays a warning — that's a malformed file, not a blocked release.Verification
I extracted the step's script from the YAML and ran it the way CI does (
bash -e, same env):RELEASE_PAT="", current pubspecs (0.8.1 / 0.6.0, neither on pub.dev)RELEASE_PAT="", versions already on pub.dev (0.7.1 / 0.5.2)Both runs hit the real pub.dev API. YAML parses and the script passes
bash -n.This does not publish anything
This only makes the failure visible. 0.8.1 and 0.6.0 are still unpublished — that needs either the
RELEASE_PATsecret added, or the two tags pushed by hand. I could not do it from this session: pushing a tag returns403(these credentials can push branches but not tags), and there's no tag-creating API available to me.Worth considering separately: pub.dev automated publishing can be bound to a GitHub Environment instead of a tag pattern, which would let a
workflow_dispatchpublish with no tag and no PAT at all. That's a pub.dev Admin-tab change plus a rewrite ofpublish.yml, so it's out of scope here.🤖 Generated with Claude Code
https://claude.ai/code/session_01P889JtFvr4ypqnHYQZCPag
Generated by Claude Code