Skip to content

Commit 6f84845

Browse files
authored
chore: release force registry (#5472)
* chore: gh action to force using npm registry * chore: force registry
1 parent bd62e67 commit 6f84845

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,16 @@ jobs:
7979
- name: Publish to npm
8080
env:
8181
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
82-
NPM_CONFIG_REGISTRY: https://registry.npmjs.org
8382
NPM_CONFIG_ALWAYS_AUTH: 'true'
8483
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
84+
# Force both npm and yarn to use npmjs and pick up the token
85+
yarn config set registry https://registry.npmjs.org
86+
npm config set registry https://registry.npmjs.org
87+
printf "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}\nalways-auth=true\n" > ~/.npmrc
88+
89+
# Sanity checks
90+
echo "yarn registry: $(yarn config get registry)"
91+
echo "npm registry: $(npm config get registry)"
8792
8893
TAG=$([ "$GITHUB_REF_NAME" = "master" ] && echo latest || echo "$GITHUB_REF_NAME")
8994
yarn nx release publish --yes --tag "$TAG"

0 commit comments

Comments
 (0)