Skip to content

Commit

Permalink
Import NPM_TOKEN before using it, and reference tag differently. (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjyar authored Jun 17, 2021
1 parent 0a229a0 commit 53b30c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,13 @@ jobs:
- name: Install modules
run: yarn install --ignore-scripts
- run: npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish NPM release
run: |
set -x
# If it's not a simple 1.2.3 version, then it's a prerelease of some kind.
if ! [[ ${TAG} =~ ^[0-9.]*$ ]] ; then
if ! [[ ${{ github.event.release.tag_name }} =~ ^[0-9.]*$ ]] ; then
PRE="--prerelease"
fi
node publish.js --publish "${PRE}"
Expand Down

0 comments on commit 53b30c6

Please sign in to comment.