workflows: add auth and access config to publishing

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-09-22 10:57:35 +02:00
parent 51af8361de
commit e02fae847b
2 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -55,7 +55,9 @@ jobs:
# not flagged as the latest release, which means that people will not get this
# version of the package unless requested explicitly
- name: publish nightly release
run: yarn workspaces foreach -v --no-private npm publish --tag nightly
run: |
yarn config set -H 'npmAuthToken' "${{secrets.NPM_TOKEN}}"
yarn workspaces foreach -v --no-private npm publish --access public --tag nightly
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+3 -2
View File
@@ -162,10 +162,11 @@ jobs:
# Publishes current version of packages that are not already present in the registry
- name: publish
run: |
yarn config set -H 'npmAuthToken' "${{secrets.NPM_TOKEN}}"
if [ -f ".changeset/pre.json" ]; then
yarn workspaces foreach -v --exclude=root --no-private npm publish --tag next
yarn workspaces foreach -v --no-private npm publish --access public --tag next
else
yarn workspaces foreach -v --exclude=root --no-private npm publish
yarn workspaces foreach -v --no-private npm publish --access public
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}