Skip to content

Commit 7080c57

Browse files
authored
Fixing package publishing
1 parent f5a5a74 commit 7080c57

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/npm-publish.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ name: Node.js Package
66
on:
77
release:
88
types: [created]
9+
pull_request:
10+
branches: [ "master" ]
911

1012
jobs:
1113
build:
@@ -17,6 +19,15 @@ jobs:
1719
node-version: 16
1820
- run: npm ci
1921
- run: npm test
22+
- run: npm run build
23+
- run: npm run build-cjs
24+
- run: npm run build-esm
25+
- name: Upload build artifacts
26+
uses: actions/upload-artifact@v3
27+
with:
28+
name: build-artifacts
29+
path: ./lib
30+
2031

2132
publish-npm:
2233
needs: build
@@ -27,8 +38,11 @@ jobs:
2738
with:
2839
node-version: 16
2940
registry-url: https://registry.npmjs.org/
41+
- name: Download build artifacts
42+
uses: actions/download-artifact@v3
43+
with:
44+
name: build-artifacts
3045
- run: npm ci
31-
- run: npm run build
3246
- run: npm publish
3347
env:
3448
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)