From daf9951d1b540d7ffbea1c23245c4103f6d9ccaa Mon Sep 17 00:00:00 2001 From: Maarten Zuidhoorn Date: Fri, 13 Nov 2026 12:41:59 +0100 Subject: [PATCH] Use OIDC for publishing preview builds Switch the preview build workflow to the `publish-preview-oidc.yml` reusable workflow and grant `id-token: write`. Preview builds no longer need the `PUBLISH_PREVIEW_NPM_TOKEN` secret, so they stop relying on a long-lived npm token. --- .github/workflows/publish-preview.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-preview.yml b/.github/workflows/publish-preview.yml index e0e64666..d82103ac 100644 --- a/.github/workflows/publish-preview.yml +++ b/.github/workflows/publish-preview.yml @@ -12,10 +12,9 @@ jobs: if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '@metamaskbot publish-preview') }} permissions: contents: read + id-token: write pull-requests: write - uses: MetaMask/github-tools/.github/workflows/publish-preview.yml@v1 + uses: MetaMask/github-tools/.github/workflows/publish-preview-oidc.yml@v1 with: environment: default-branch docs-url: 'https://github.com/MetaMask/release-tools/blob/main/docs/processes/preview-builds.md' - secrets: - PUBLISH_PREVIEW_NPM_TOKEN: ${{ secrets.PUBLISH_PREVIEW_NPM_TOKEN }}