From b03adbb9c600f61832e19e96ab8d24eedc08f11f Mon Sep 17 00:00:00 2001 From: Maarten Zuidhoorn Date: Fri, 13 Nov 2026 17:08:31 +0100 Subject: [PATCH] Add manual trigger to the preview build workflow NPM trusted publishing does not support the `issue_comment` trigger. Replace it with `workflow_dispatch`, so a preview build can be published for a pull request number or a branch. Add a `dry-run` input and pass all three inputs to the reusable workflow. --- .github/workflows/publish-preview.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-preview.yml b/.github/workflows/publish-preview.yml index e0e64666..687d3e0d 100644 --- a/.github/workflows/publish-preview.yml +++ b/.github/workflows/publish-preview.yml @@ -1,20 +1,36 @@ name: Publish a preview build on: - issue_comment: - types: created + workflow_dispatch: + inputs: + pull-request: + description: 'Pull request number to publish a preview build for. Mutually exclusive with "branch".' + required: false + type: number + branch: + description: 'Branch in this repository to publish a preview build for. Mutually exclusive with "pull-request".' + required: false + type: string + default: '' + dry-run: + description: 'Perform a dry run.' + type: boolean + required: false + default: false permissions: contents: read jobs: publish-preview: - if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '@metamaskbot publish-preview') }} permissions: contents: read pull-requests: write uses: MetaMask/github-tools/.github/workflows/publish-preview.yml@v1 with: + pull-request: ${{ github.event.inputs.pull-request }} + branch: ${{ github.event.inputs.branch }} + dry-run: ${{ github.event.inputs.dry-run }} environment: default-branch docs-url: 'https://github.com/MetaMask/release-tools/blob/main/docs/processes/preview-builds.md' secrets: