Skip to content

chore: use reusable publish-preview workflow from github-tools#8233

Merged
cryptodev-2s merged 1 commit intomainfrom
use-reusable-preview-workflow
Mar 18, 2026
Merged

chore: use reusable publish-preview workflow from github-tools#8233
cryptodev-2s merged 1 commit intomainfrom
use-reusable-preview-workflow

Conversation

@cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Mar 18, 2026

Explanation

Replace the inline preview build workflow with the reusable publish-preview workflow from MetaMask/github-tools@v1 and delete old scripts that are no longer needed.

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

Medium Risk
CI publishing logic is replaced with a reusable workflow, which changes how preview artifacts are built and published with an NPM token. Risk is moderate because it impacts the release pipeline, but the change is largely a refactor/removal of custom scripting.

Overview
Replaces the repo’s inline publish-preview GitHub Actions workflow (fork checks, build/upload artifacts, manifest validation, publish, and PR commenting) with a single call to the reusable MetaMask/github-tools publish-preview workflow.

Removes the now-unused local preview-build helper scripts (scripts/generate-preview-build-message.ts, scripts/prepare-preview-builds.sh, and scripts/prepare-preview-builds.jq).

Written by Cursor Bugbot for commit 183cdc7. This will update automatically on new commits. Configure here.

@cryptodev-2s cryptodev-2s requested a review from a team as a code owner March 18, 2026 15:21
@cryptodev-2s cryptodev-2s self-assigned this Mar 18, 2026
@cryptodev-2s cryptodev-2s enabled auto-merge March 18, 2026 15:21
@mcmire
Copy link
Contributor

mcmire commented Mar 18, 2026

@metamaskbot publish-preview

@cryptodev-2s
Copy link
Contributor Author

@metamaskbot publish-preview

Unfortunately this will use the main version

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

I was thinking we might be able to test it in this PR, but I guess not. Anyway, LGTM.

@cryptodev-2s cryptodev-2s added this pull request to the merge queue Mar 18, 2026
Merged via the queue into main with commit 835fe94 Mar 18, 2026
322 checks passed
@cryptodev-2s cryptodev-2s deleted the use-reusable-preview-workflow branch March 18, 2026 16:31
github-merge-queue bot pushed a commit that referenced this pull request Mar 18, 2026
## Explanation

The reusable `publish-preview` workflow from `github-tools` requires
`contents: read` (checkout) and `pull-requests: write` (PR comment).
MetaMask's org restricts default token permissions to read-only, so
these must be explicitly declared by the caller.

## References

- Fixes workflow validation error from #8233

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [x] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: only updates workflow permissions, with no product code or
runtime logic changes.
> 
> **Overview**
> Ensures the reusable `publish-preview` GitHub Actions workflow can run
under restricted org defaults by explicitly granting `contents: read`
(checkout) and `pull-requests: write` (PR commenting) permissions.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cd67686. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
micaelae pushed a commit that referenced this pull request Mar 19, 2026
## Explanation

Replace the inline preview build workflow with the reusable
`publish-preview` workflow from `MetaMask/github-tools@v1` and delete
old scripts that are no longer needed.

## References

- MetaMask/github-tools#223
- MetaMask/github-tools#227

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [x] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> CI publishing logic is replaced with a reusable workflow, which
changes how preview artifacts are built and published with an NPM token.
Risk is moderate because it impacts the release pipeline, but the change
is largely a refactor/removal of custom scripting.
> 
> **Overview**
> Replaces the repo’s inline `publish-preview` GitHub Actions workflow
(fork checks, build/upload artifacts, manifest validation, publish, and
PR commenting) with a single call to the reusable
`MetaMask/github-tools` `publish-preview` workflow.
> 
> Removes the now-unused local preview-build helper scripts
(`scripts/generate-preview-build-message.ts`,
`scripts/prepare-preview-builds.sh`, and
`scripts/prepare-preview-builds.jq`).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
183cdc7. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
micaelae pushed a commit that referenced this pull request Mar 19, 2026
## Explanation

The reusable `publish-preview` workflow from `github-tools` requires
`contents: read` (checkout) and `pull-requests: write` (PR comment).
MetaMask's org restricts default token permissions to read-only, so
these must be explicitly declared by the caller.

## References

- Fixes workflow validation error from #8233

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [x] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: only updates workflow permissions, with no product code or
runtime logic changes.
> 
> **Overview**
> Ensures the reusable `publish-preview` GitHub Actions workflow can run
under restricted org defaults by explicitly granting `contents: read`
(checkout) and `pull-requests: write` (PR commenting) permissions.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cd67686. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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