Skip to content

ci: Publish snapshots from workflow_dispatch instead of issue_comment - #507

Merged
eddeee888 merged 1 commit into
masterfrom
ci/snapshot-via-workflow-dispatch
Nov 20, 2026
Merged

eddeee888 merged 1 commit into
masterfrom
ci/snapshot-via-workflow-dispatch

Conversation

@eddeee888

Copy link
Copy Markdown
Owner

Why

  • Every snapshot release since Sept 22 has failed with 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 answers 404 OIDC token exchange error - package not found. The only difference from the push-triggered release, which still publishes, is event_name: issue_comment.
  • npm now rejects trusted publishing tokens from issue_comment runs, as it already did for pull_request_target (weavejs issue, The Hacker News). PyPI made the same change (pypi/warehouse#20765).

What

  • Snapshots publish from workflow_dispatch: release-snapshot now runs only on workflow_dispatch, with a required pr number input. It's still in release.yml, so the existing npm trusted publisher config keeps matching and nothing changes on npm.
  • The comment command still works: release-snapshot-trigger (renamed from release-snapshot-check) still runs on PR comments and still checks the commenter is OWNER. It then runs gh workflow run release.yml -f pr=<n> instead of publishing. A dispatch started with GITHUB_TOKEN creates a run, because GitHub exempts workflow_dispatch from its rule against workflows triggering workflows. That job gets actions: write for this.
  • Manual snapshots: you can also start one from the Actions tab, or with gh workflow run release.yml -f pr=<n>.
  • Trigger only matches at the start of a comment (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.
  • Failure comments:
    • an unauthorized commenter still gets "No permission"
    • a failed dispatch gets "Failed to start snapshot release"
    • publish success and failure still comment on the PR, using the pr input
  • release runs only on push. It used to check github.event.comment == '', which would also match workflow_dispatch.
  • Removes the diagnostic step from ci: Diagnose npm OIDC exchange in release-snapshot #506.

Verification

Resources


Generated by Claude Code

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
@changeset-bot

changeset-bot Bot commented Nov 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bda048a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@eddeee888
eddeee888 merged commit d1abe90 into master Nov 20, 2026
19 checks passed
@eddeee888
eddeee888 deleted the ci/snapshot-via-workflow-dispatch branch November 20, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants