Skip to content

ci: switch preview builds to OIDC publishing - #713

Merged
Mrtenz merged 2 commits into
mainfrom
mrtenz/publish-preview-oidc
Nov 23, 2026
Merged

Mrtenz merged 2 commits into
mainfrom
mrtenz/publish-preview-oidc

Conversation

@Mrtenz

@Mrtenz Mrtenz commented Nov 23, 2026

Copy link
Copy Markdown
Member

The "Publish a preview build" workflow runs when someone comments @metamaskbot publish-preview, and it publishes with the long-lived PUBLISH_PREVIEW_NPM_TOKEN secret. This PR moves it to NPM trusted publishing (OIDC), which MetaMask/core already uses.

  • publish-preview.yml now runs manually through workflow_dispatch and calls the publish-preview-oidc.yml reusable workflow from MetaMask/github-tools. It takes a pull request number or a branch. It can publish all packages, a given list, or only the packages that changed. Publishing goes through the npm-preview environment, so we no longer need the NPM token secret.
  • publish-preview-comment.yml is new. If someone posts the old @metamaskbot publish-preview comment, it replies with a link to the new workflow and the PR number to enter.

References

Replace the `issue_comment` trigger in `publish-preview.yml` with
`workflow_dispatch`, and call the `publish-preview-oidc.yml` reusable
workflow from `MetaMask/github-tools`. Publishing now goes through the
`npm-preview` environment, so the long-lived `PUBLISH_PREVIEW_NPM_TOKEN`
secret is no longer needed.

Add `publish-preview-comment.yml`, which replies to legacy
`@metamaskbot publish-preview` comments with instructions for the new
workflow.

Based on MetaMask/core#11534 and MetaMask/core#11682.
Comment thread .github/workflows/publish-preview.yml Resolved
Comment thread .github/workflows/main.yml Resolved
@Mrtenz
Mrtenz marked this pull request as ready for review November 23, 2026 12:04
@Mrtenz
Mrtenz requested a review from a team as a code owner November 23, 2026 12:04
@Mrtenz
Mrtenz enabled auto-merge November 23, 2026 12:16
@Mrtenz
Mrtenz added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit c6943d4 Nov 23, 2026
27 checks passed
@Mrtenz
Mrtenz deleted the mrtenz/publish-preview-oidc branch November 23, 2026 12:25
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