From 4b408975b92cd02ec7f050098c1f6f3210af4869 Mon Sep 17 00:00:00 2001 From: Davide Segullo Date: Sat, 26 Oct 2024 15:38:33 +0200 Subject: [PATCH] ci: :construction_worker: use npm token only when required --- .github/workflows/release-preview.yml | 5 +++-- .github/workflows/release-production.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-preview.yml b/.github/workflows/release-preview.yml index 4a7f5abf..57749f0b 100644 --- a/.github/workflows/release-preview.yml +++ b/.github/workflows/release-preview.yml @@ -17,8 +17,6 @@ jobs: RELEASE_PREID: ${{ vars.RELEASE_PREID }} RELEASE_SPECIFIER: ${{ vars.RELEASE_SPECIFIER }} RELEASE_TAG: ${{ vars.RELEASE_TAG }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_CONFIG_PROVENANCE: true steps: # Step 1: Check out the repository code @@ -65,6 +63,9 @@ jobs: # Step 9: Run the release - name: Run Nx release version + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_CONFIG_PROVENANCE: true run: bun run tools/scripts/release.ts -d false # Step 10: Clean up dist directory diff --git a/.github/workflows/release-production.yml b/.github/workflows/release-production.yml index cbaf2708..9466a1fe 100644 --- a/.github/workflows/release-production.yml +++ b/.github/workflows/release-production.yml @@ -15,8 +15,6 @@ jobs: id-token: write # needed for provenance data generation env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_CONFIG_PROVENANCE: true steps: # Step 1: Check out the repository code @@ -63,6 +61,9 @@ jobs: # Step 9: Run the release - name: Run Nx release version + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_CONFIG_PROVENANCE: true run: bun run tools/scripts/release.ts -d false # Step 10: Clean up dist directory