ci: release through the OIDC variant of the shared workflow - #846
Merged
Conversation
pnpm-release-changeset.yml@v2 fails at changesets/action with "The
GITHUB_TOKEN environment variable is set and does not match the
github-token input". That variant passes CI_GITHUB_TOKEN both as the
input and as the env var, and action v2 still reads them as different —
getInput trims, process.env does not, and the org secret dates from
2022. No repo has released through it successfully.
The OIDC variant passes no github-token input at all, so the env var
matches the action's own ${{ github.token }} default and the check
passes. It is also what repobuddy/repobuddy already releases through,
and what the shared repo's README tells consumers to prefer: npm
credentials are minted per run instead of living in NPM_TOKEN, and
publishes carry provenance attestations.
Requires a trusted publisher registered for storybook-addon-vis and
vitest-plugin-vis naming this repo and release.yml. secrets: inherit
goes with it — the callee reads no repo secrets now.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
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.
Publishing fails with an auth error until both published packages have a trusted publisher registered at
npmjs.com/package/<name>/access, naming this repo and the caller workflow filename —release.yml, not the reusable workflow's name:storybook-addon-visvitest-plugin-visI cannot do this part — it needs npm account access.
Why
pnpm-release-changeset.yml@v2, adopted in #844, gets as far aschangesets/actionand then fails:That variant passes
CI_GITHUB_TOKENas both thegithub-tokeninput and the step'sGITHUB_TOKENenv var. They are written as the same expression and the action still reads them as unequal —core.getInput()trims,process.envdoes not, and that org secret was created in 2022.repobuddy/repobuddyis the only repo on@v2that releases successfully, and it uses the OIDC variant, so the CI_GITHUB_TOKEN variant appears never to have worked.The OIDC variant passes no
github-tokeninput, so the env var matches the action's own${{ github.token }}default and the check passes. It is also what the shared repo's README tells consumers to prefer: npm credentials are minted per run rather than living in a long-livedNPM_TOKEN, and publishes carry provenance attestations.What changes
releasecallspnpm-release-changeset-oidc.yml@v2secrets: inheritdropped — the callee reads no repo secrets nowKnown trade-off, and why it costs nothing here
A PR opened with the built-in
GITHUB_TOKENdoes not triggeron: pull_request, so future "Version Packages" PRs get no status checks.mainhas no branch protection and no required checks, so nothing blocks on them.Worth knowing: this repo does not carry
branches-ignore: ['changeset-release/*']onpull-request.yml, contrary to what the shared README assumes about consumers. It stops mattering under OIDC — the checks simply never start — but the README's claim is wrong for this repo.After merging
Once a release publishes successfully,
NPM_TOKENandCI_GITHUB_TOKENcan be deleted from the org secrets — but only after every consumer has migrated, since both are org-wide and other repos still use them.🤖 Generated with Claude Code