Skip to content

ci: release through the OIDC variant of the shared workflow - #846

Merged
unional merged 1 commit into
mainfrom
ci/oidc-release
Aug 20, 2026
Merged

ci: release through the OIDC variant of the shared workflow#846
unional merged 1 commit into
mainfrom
ci/oidc-release

Conversation

@unional

@unional unional commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

⚠️ Do not merge until trusted publishers are registered

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:

I cannot do this part — it needs npm account access.

Why

pnpm-release-changeset.yml@v2, adopted in #844, gets as far as changesets/action and then fails:

Error: The GITHUB_TOKEN environment variable is set and does not match
the "github-token" input.

That variant passes CI_GITHUB_TOKEN as both the github-token input and the step's GITHUB_TOKEN env var. They are written as the same expression and the action still reads them as unequal — core.getInput() trims, process.env does not, and that org secret was created in 2022. repobuddy/repobuddy is the only repo on @v2 that 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-token input, 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-lived NPM_TOKEN, and publishes carry provenance attestations.

What changes

Known trade-off, and why it costs nothing here

A PR opened with the built-in GITHUB_TOKEN does not trigger on: pull_request, so future "Version Packages" PRs get no status checks. main has no branch protection and no required checks, so nothing blocks on them.

Worth knowing: this repo does not carry branches-ignore: ['changeset-release/*'] on pull-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_TOKEN and CI_GITHUB_TOKEN can 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

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

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6c2bf77

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

@unional
unional merged commit b3099f1 into main Aug 20, 2026
10 checks passed
@unional
unional deleted the ci/oidc-release branch August 20, 2026 09:01
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.

1 participant