Skip to content

Commit 3261e29

Browse files
maximizeITGitHub Copilot
andcommitted
fix(ci): write github packages auth to ~/.npmrc for yarn 1 classic
actions/setup-node writes auth via NPM_CONFIG_USERCONFIG which yarn 1 does not read. Explicitly append the auth token to ~/.npmrc so yarn can find it when installing @staffbase/widget-sdk from npm.pkg.github.com. Co-authored-by: GitHub Copilot <copilot@noreply.github.com>
1 parent b6d92ac commit 3261e29

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ jobs:
2727
registry-url: 'https://npm.pkg.github.com/'
2828
scope: '@staffbase'
2929

30+
- name: Configure GitHub Packages auth for yarn
31+
run: echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
32+
env:
33+
NODE_AUTH_TOKEN: ${{ secrets.STAFFBOT_NPM_READ || secrets.GITHUB_TOKEN }}
34+
3035
- name: Install Yarn Dependencies
3136
working-directory: samples/weather-forecast
3237
run: yarn install --frozen-lockfile

0 commit comments

Comments
 (0)