Skip to content

Commit ba7e57f

Browse files
committed
chore(ci): add npm publish
1 parent 15a1c66 commit ba7e57f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ jobs:
3232
- name: Build and package
3333
run: npm build
3434

35-
# - name: Publish
36-
# if: ${{ github.event_name != 'pull_request' && matrix.node-version == 14 }}
37-
# env:
38-
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
39-
# run: npm publish
35+
- name: Publish
36+
if: ${{ startsWith(github.ref, 'refs/tags/' && matrix.node-version == 14 ) }}
37+
##if: ${{ github.event_name != 'pull_request' && matrix.node-version == 14 }}
38+
env:
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
run: |
41+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
42+
npm publish

0 commit comments

Comments
 (0)