Skip to content

Commit 7015fd0

Browse files
committed
Fix publish
1 parent c59c3e6 commit 7015fd0

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

.github/workflows/publish_on_npm.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
name: Publish to npm
22
on:
33
push:
4+
branches: master
45
tags:
56
- '*'
67

78
jobs:
8-
deploy:
9+
publish:
910
runs-on: ubuntu-latest
10-
1111
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v4
14-
15-
- name: Set up Node.js
16-
uses: actions/setup-node@v4
12+
- uses: actions/checkout@v4
13+
# Setup .npmrc file to publish to npm
14+
- uses: actions/setup-node@v4
1715
with:
18-
node-version: '20'
19-
20-
- name: Install dependencies
21-
run: npm install
22-
23-
- name: Publish to npm
24-
run: npm publish --access public
16+
node-version: '20.x'
17+
registry-url: 'https://registry.npmjs.org'
18+
- run: npm install
19+
- run: npm test
20+
- run: npm publish
2521
env:
2622
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)