Skip to content

Commit 8cd4435

Browse files
authored
chore: gh action to force using npm registry (#5471)
1 parent 1f9363b commit 8cd4435

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ jobs:
7979
- name: Publish to npm
8080
env:
8181
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
82+
NPM_CONFIG_REGISTRY: https://registry.npmjs.org
83+
NPM_CONFIG_ALWAYS_AUTH: 'true'
8284
run: |
85+
# Force registry + token for both npm and yarn
86+
printf "registry=https://registry.npmjs.org\n//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}\nalways-auth=true\n" > ~/.npmrc
87+
8388
TAG=$([ "$GITHUB_REF_NAME" = "master" ] && echo latest || echo "$GITHUB_REF_NAME")
84-
yarn nx release publish --yes --registry https://registry.npmjs.org --tag "$TAG"
89+
yarn nx release publish --yes --tag "$TAG"

0 commit comments

Comments
 (0)