Skip to content

Commit

Permalink
ci: 👷 use npm token only when required
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideSegullo committed Oct 26, 2024
1 parent 84db229 commit 4b40897
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4b40897

Please sign in to comment.