Skip to content

Commit 53b30c6

Browse files
authored
Import NPM_TOKEN before using it, and reference tag differently. (#58)
1 parent 0a229a0 commit 53b30c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/publish.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,13 @@ jobs:
122122
- name: Install modules
123123
run: yarn install --ignore-scripts
124124
- run: npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
125+
env:
126+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
125127
- name: Publish NPM release
126128
run: |
129+
set -x
127130
# If it's not a simple 1.2.3 version, then it's a prerelease of some kind.
128-
if ! [[ ${TAG} =~ ^[0-9.]*$ ]] ; then
131+
if ! [[ ${{ github.event.release.tag_name }} =~ ^[0-9.]*$ ]] ; then
129132
PRE="--prerelease"
130133
fi
131134
node publish.js --publish "${PRE}"

0 commit comments

Comments
 (0)