Repository navigation
ci: publish only from tag refs; fix re-run docs - #227
Open
MichaelGHSeg wants to merge 1 commit into
Open
MichaelGHSeg wants to merge 1 commit into
MichaelGHSeg wants to merge 1 commit into
Conversation
pub.dev rejects OIDC tokens from branch refs, including workflow_dispatch on main. Require a tag ref and derive the package from it for both triggers, drop the package input, and correct RELEASING.md.
MichaelGHSeg
marked this pull request as ready for review
November 3, 2026 17:53
bsneed
approved these changes
Nov 3, 2026
This branch has not been deployed
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.
Summary
Dispatching the publish workflow from
maingot past the OIDC exchange (#226), and then pub.dev rejected the token:pub.dev's
workflow_dispatchoption only covers a dispatch run on a tag. The re-run path in RELEASING.md and in #226's description (dispatch frommainwithpackage: core) can never work. This PR:check-release-metadata.sh: requiresgithub.ref_type == tagand derives the package from the tag for both push and dispatch. A branch dispatch now fails inmeta, before anyone is asked to approve, and says to use--ref <tag>.publish.yml: drops the now-redundantpackageinput and corrects the header comment.gh workflow run publish.yml --ref <tag>(uses the workflow as of the tag). If the commit or the workflow was wrong, recreate the tag on the fixedmain, which is only safe while the version isn't on pub.dev. Theproductionenvironment's deployment refs now name only the tag patterns, notmain.2.0.0 itself was recovered by recreating
segment_analytics-v2.0.0onmain(release commit + #226).Testing
Ran the script locally against
origin/main:tag segment_analytics-v2.0.0→OK: segment_analytics 2.0.0tag segment_analytics_plugin_idfa-v1.0.4→ OKbranch main→ fails with the--ref <tag>hinttag segment_analytics-v1.9.9→ version mismatchtag segment_analytics_plugin_..-v1.0.0→ rejectedbash -nis clean and the workflow YAML parses.