ci: add preview build publishing - #326
Merged
Merged
Conversation
Wires up the reusable publish-preview workflow from github-tools so a `@metamaskbot publish-preview` comment on a PR publishes a preview build to the `@metamask-previews` scope. Adds a README section covering how to create and consume one.
Contributor
Author
Member
|
Why are we adding this if the repo will be migrated to |
Contributor
Author
You where faster to comment I was trying to use the preview build in both clients and core to ensure everything still work correctly. This is already stated in the previous comment |
Mrtenz
reviewed
Sep 7, 2026
| - The name is scoped to `@metamask-previews` instead of `@metamask`. | ||
| - The ID of the last commit in the branch is appended to the version, e.g. `1.2.3-preview-e2df9b4` instead of `1.2.3`. | ||
|
|
||
| #### Using a preview build |
Member
There was a problem hiding this comment.
These instructions are outdated. We use a preview build Yarn plugin in the clients.
Doesn't really matter since we're migrating this repo anyway.
Mrtenz
approved these changes
Sep 7, 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.
Adds preview build publishing to this repo by calling the reusable
publish-previewworkflow fromMetaMask/github-tools@v1, plus a README section explaining how to create and consume one.Commenting
@metamaskbot publish-previewon a PR publishes@metamask-previews/utils@<version>-preview-<sha>and posts the version back on the PR.Notes:
is-monorepo: falsesince this is a single package repo.environmentinput, matching what every other polyrepo does (create-release-branch, auto-changelog, ppom-validator, swaps-controller, etc). Onlycoregates ondefault-branch.docs-urlpoints at the new README section.Needs before this works:
PUBLISH_PREVIEW_NPM_TOKENhas to be added as a repo secret. It does not exist yet on this repo or at the org level.Note
Low Risk
Changes are CI and documentation only; no library runtime behavior changes, though preview publishes require a new npm token secret.
Overview
Adds PR-triggered preview npm publishing so contributors can test
@metamask/utilschanges in downstream projects before release.A new
publish-previewworkflow runs when someone comments@metamaskbot publish-previewon a pull request. It calls the reusableMetaMask/github-toolsworkflow (withis-monorepo: falseand adocs-urlanchor to the README) and passesPUBLISH_PREVIEW_NPM_TOKENfor publishing scoped preview packages (e.g.@metamask-previews/utils@…-preview-<sha>).The README gains a “Testing changes in other projects using preview builds” section: how to trigger a build, override Yarn/NPM resolutions to consume the preview, and refresh after new commits. Note: the workflow depends on adding the
PUBLISH_PREVIEW_NPM_TOKENrepo secret, which is not present yet.Reviewed by Cursor Bugbot for commit a8ac8e9. Bugbot is set up for automated code reviews on this repo. Configure here.