Skip to content

Commit 110fb11

Browse files
committed
pass npm token to node setup
1 parent 88d984b commit 110fb11

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/actions/yarn/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: 'Restore Yarn Cache'
22
description: 'Setup a NodeJS environment and restore cache if any, given a node version'
33

4+
inputs:
5+
token:
6+
required: false
7+
description: 'The NPM token to use'
8+
49
runs:
510
using: 'composite'
611
steps:
@@ -9,6 +14,9 @@ runs:
914
with:
1015
node-version-file: .nvmrc
1116
registry-url: 'https://registry.npmjs.org'
17+
env:
18+
NODE_AUTH_TOKEN: ${{ inputs.token }}
19+
1220
- uses: actions/cache@v4
1321
with:
1422
path: |

.github/workflows/publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
git config --global push.default current
3737
3838
- uses: ./.github/actions/yarn
39+
with:
40+
token: ${{ secrets.NPM_TOKEN }}
3941

4042
- run: yarn turbo run build --concurrency=3
4143
- name: Publish

0 commit comments

Comments
 (0)