Repository navigation
ci: switch preview builds to OIDC publishing - #671
Merged
Merged
Conversation
The "Publish a preview build" workflow used to run from an `@metamaskbot publish-preview` comment and publish with the long-lived `PUBLISH_PREVIEW_NPM_TOKEN` secret. It now runs through `workflow_dispatch` and calls the `publish-preview-oidc.yml` reusable workflow from `MetaMask/github-tools`, which publishes through NPM trusted publishing (OIDC) in the `npm-preview` environment. The workflow takes a pull request number or branch, and can publish all packages, a given list, or only changed packages. A new `publish-preview-comment.yml` workflow replies to the old comment command with a link to the new workflow. The preview build docs are updated to match. References: - MetaMask/core#11534 - MetaMask/core#11682
Mrtenz
commented
Nov 24, 2026
| dry-run: ${{ inputs.dry-run }} | ||
| rename-after-install-and-build: true | ||
| environment: default-branch | ||
| environment: npm-preview |
Member
Author
There was a problem hiding this comment.
This is an intentional change. I will make sure the environment is configured before merging.
Mrtenz
marked this pull request as ready for review
November 24, 2026 14:19
Mrtenz
temporarily deployed
to
default-branch
November 24, 2026 14:19 — with
GitHub Actions
Inactive
In `publish-preview-comment.yml`, reference the action by the commit SHA of `v9.0.0` instead of the mutable `v9` tag. A moved tag can no longer change the code the workflow runs.
mikesposito
approved these changes
Nov 24, 2026
|
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.



Explanation
The "Publish a preview build" workflow used to run when someone commented
@metamaskbot publish-preview, and it published with the long-livedPUBLISH_PREVIEW_NPM_TOKENsecret. This PR moves it to NPM trusted publishing (OIDC), whichMetaMask/corealready uses.publish-preview.ymlnow runs manually throughworkflow_dispatchand calls thepublish-preview-oidc.ymlreusable workflow fromMetaMask/github-tools. It takes a pull request number or a branch, and can publish all packages, a given list, or only the packages that changed. Publishing goes through thenpm-previewenvironment, so the NPM token secret is no longer needed. The existingBUILD_ENVandrename-after-install-and-buildsettings are kept.publish-preview-comment.ymlis new. If someone posts the old@metamaskbot publish-previewcomment, it replies with a link to the new workflow and the PR number to enter.docs/processes/preview-builds.mddescribes the new flow.References
Checklist