Skip to content

Commit d0813db

Browse files
committed
ci(workflows): add npm-token input to pnpm setup action
1 parent 6a27506 commit d0813db

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/actions/setup-pnpm/action.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ inputs:
77
required: true
88
default: "22"
99

10-
pnpm-version:
11-
description: "PNPM version"
12-
required: false
13-
default: "latest"
10+
pnpm-version:
11+
description: "PNPM version"
12+
required: false
13+
default: "latest"
14+
15+
npm-token:
16+
description: "NPM token"
17+
required: false
1418

1519
runs:
1620
using: "composite"
@@ -26,7 +30,7 @@ runs:
2630
shell: bash
2731

2832
- name: Setup npmrc
29-
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
33+
run: echo "//registry.npmjs.org/:_authToken=${{ inputs.npm-token }}" > .npmrc
3034
shell: bash
3135

3236
- name: Setup pnpm config

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
uses: ./.github/actions/setup-pnpm
2222
with:
2323
node-version: 22
24+
npm-token: ${{ secrets.NPM_TOKEN }}
2425

2526
- name: Build Package
2627
run: pnpm run build
@@ -44,6 +45,7 @@ jobs:
4445
uses: ./.github/actions/setup-pnpm
4546
with:
4647
node-version: 22
48+
npm-token: ${{ secrets.NPM_TOKEN }}
4749

4850
- name: Build Docs Package
4951
run: pnpm run docs:build

0 commit comments

Comments
 (0)