Skip to content

Commit d2d6f55

Browse files
committed
Update publish workflow
1 parent 7cffb96 commit d2d6f55

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1+
name: npm-publish
12
on:
23
push:
3-
branches: main
4-
4+
branches:
5+
- master # Change this to your default branch
56
jobs:
6-
publish:
7+
npm-publish:
8+
name: npm-publish
79
runs-on: ubuntu-latest
810
steps:
9-
- uses: actions/checkout@v4
10-
- uses: actions/setup-node@v3
11+
- name: Checkout repository
12+
uses: actions/checkout@master
13+
- name: Set up Node.js
14+
uses: actions/setup-node@master
1115
with:
12-
node-version: "20"
13-
- uses: JS-DevTools/npm-publish@v3
14-
with:
15-
token: ${{ secrets.NPM_TOKEN }}
16+
node-version: 10.0.0
17+
- name: Publish if version has been updated
18+
uses: pascalgn/npm-publish-action@51fdb4531e99aac1873764ef7271af448dc42ab4
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)