Skip to content

Commit

Permalink
assert npm token
Browse files Browse the repository at this point in the history
  • Loading branch information
Allless committed Jul 11, 2024
1 parent 6dc6f3e commit ecf09ca
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ jobs:
run: echo //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }} > .npmrc && npm publish --registry=https://npm.pkg.github.com

- name: Asserts NPM token to not be empty
run: if [ -z "${{ secrets.NPM_TOKEN }}" ];
then
echo "NPM_TOKEN is not set";
exit 1;
fi
run: [ -z "${{ secrets.NPM_TOKEN }}" ] && { echo "token is not set"; exit 1; }

- name: Publish package to NPM
run: echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} > .npmrc && npm publish --registry=https://registry.npmjs.org

0 comments on commit ecf09ca

Please sign in to comment.