Repository navigation
ci: Publish snapshots from workflow_dispatch instead of issue_comment - #507
Merged
Merged
Conversation
npm rejects trusted publishing (OIDC) tokens from issue_comment runs, so every snapshot since September failed with E404. The comment now starts a workflow_dispatch run of release.yml, which keeps the existing trusted publisher config. Also removes the OIDC diagnostic step and only matches the trigger at the start of a comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NyYayCPaAA2eaLr74FHJHN
|
1 of 2 tasks
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.
Why
E404. The diagnostic step from ci: Diagnose npm OIDC exchange in release-snapshot #506 showed why (run). The OIDC token's claims match the npm trusted publisher exactly: repo,release.yml@refs/heads/master, no environment. npm still answers404 OIDC token exchange error - package not found. The only difference from the push-triggered release, which still publishes, isevent_name: issue_comment.issue_commentruns, as it already did forpull_request_target(weavejs issue, The Hacker News). PyPI made the same change (pypi/warehouse#20765).What
workflow_dispatch:release-snapshotnow runs only onworkflow_dispatch, with a requiredprnumber input. It's still inrelease.yml, so the existing npm trusted publisher config keeps matching and nothing changes on npm.release-snapshot-trigger(renamed fromrelease-snapshot-check) still runs on PR comments and still checks the commenter isOWNER. It then runsgh workflow run release.yml -f pr=<n>instead of publishing. A dispatch started withGITHUB_TOKENcreates a run, because GitHub exemptsworkflow_dispatchfrom its rule against workflows triggering workflows. That job getsactions: writefor this.gh workflow run release.yml -f pr=<n>.prefix_only: true). It used to match the text anywhere, so changeset-bot's "add a changeset" link set it off on ci: Diagnose npm OIDC exchange in release-snapshot #506, because the branch name contained the command.prinputreleaseruns only onpush. It used to checkgithub.event.comment == '', which would also matchworkflow_dispatch.Verification
workflow_dispatchrun, and that run should publish the snapshot and comment on the PR.Resources
Generated by Claude Code