Skip to content

Commit 64a065a

Browse files
committed
Refactor GitHub Actions workflow to improve build and publish steps
1 parent 172ba1e commit 64a065a

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,25 @@ on:
55
types: [ created ]
66

77
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: 20
15+
- run: npm i
16+
817
publish-npm:
18+
needs: build
919
runs-on: ubuntu-latest
1020
steps:
1121
- uses: actions/checkout@v3
1222
- uses: actions/setup-node@v3
1323
with:
14-
node-version: 18
24+
node-version: 20
1525
registry-url: https://registry.npmjs.org/
16-
- run: |
17-
npm i
18-
npm publish
26+
- run: npm i
27+
- run: npm publish
1928
env:
2029
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)