Skip to content

ci: add package selection inputs to publish preview workflow - #11682

Merged
Mrtenz merged 1 commit into
mainfrom
mrtenz/publish-preview-packages
Nov 20, 2026
Merged

Mrtenz merged 1 commit into
mainfrom
mrtenz/publish-preview-packages

Conversation

@Mrtenz

@Mrtenz Mrtenz commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Explanation

The publish preview workflow currently publishes preview builds for every package in the monorepo. This adds two inputs to the workflow and passes them through to the reusable workflow:

  • packages: a comma-separated list of packages to publish (e.g., @metamask/network-controller, permission-controller). If left empty, all packages are published.
  • only-changed-packages: when enabled, publishes only the packages that changed relative to the base branch. Defaults to true.

The two inputs can't be used together.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Workflow-only change with no runtime or data-handling impact; risk is limited to CI preview publish scope and depends on the external reusable workflow behaving as documented.

Overview
Extends the manual publish preview workflow (publish-preview.yml) so runs no longer have to publish the entire monorepo by default.

Two new workflow_dispatch inputs are wired through to MetaMask/github-tools’s publish-preview-oidc reusable workflow: packages (optional comma-separated allowlist; empty means all packages) and only-changed-packages (defaults to true, limits publishes to packages changed vs the base branch). The inputs are documented as mutually exclusive.

This is CI configuration only; behavior depends on the shared workflow in github-tools (referenced in the PR).

Reviewed by Cursor Bugbot for commit eab7370. Bugbot is set up for automated code reviews on this repo. Configure here.

Add `packages` and `only-changed-packages` inputs to the publish preview
workflow and pass them through to the reusable workflow. Callers can now
publish preview builds for a chosen set of packages, or only for the
packages changed compared to the base branch, instead of always
publishing everything.
@github-actions

Copy link
Copy Markdown
Contributor

🛑 Files requiring codeowner review

To merge this PR, you'll need to get approvals from the following owners.

@MetaMask/core-platform (1 file)
  • .github/workflows/publish-preview.yml

description: 'Only publish packages changed compared to the base branch. Mutually exclusive with "packages".'
required: false
type: boolean
default: true

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Downside of having this enabled by default is that you need to remember to uncheck it when filling out "packages". Wondering if we should disable it by default?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d keep it enabled and check back next week, once teams have used it a few times, to see whether they’re using it as intended.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

@Mrtenz
Mrtenz marked this pull request as ready for review November 20, 2026 11:35
@Mrtenz
Mrtenz requested a review from a team as a code owner November 20, 2026 11:35
@Mrtenz
Mrtenz added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit d343870 Nov 20, 2026
82 checks passed
@Mrtenz
Mrtenz deleted the mrtenz/publish-preview-packages branch November 20, 2026 13:13
Qkin-Keystone pushed a commit to KeystoneHQ/accounts that referenced this pull request Nov 24, 2026
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

- MetaMask/core#11534
- MetaMask/core#11682

This branch was previously deployed

1 inactive deployment
default-branch — eab73706 Deployed Nov 20, 2026 by Mrtenz via Determine whether this PR is a release PR #7429
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