Skip to content

Commit

Permalink
ci: update publish step.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpfs committed Sep 30, 2021
1 parent 612b704 commit 58aa21c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,14 @@ jobs:

- name: Publish
run: |
if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
if git log -1 --pretty=%B | grep "^v[0-9]\+\.[0-9]\+\.[0-9]\+$";
then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --access public
elif git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+";
cd node && npm publish --access public
elif git log -1 --pretty=%B | grep "^v[0-9]\+\.[0-9]\+\.[0-9]\+";
then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --tag next --access public
cd node && npm publish --tag next --access public
else
echo "Not a release, skipping publish"
fi
Expand Down

0 comments on commit 58aa21c

Please sign in to comment.