Skip to content

Commit 1fec667

Browse files
authored
Merge pull request #271 from microsoft/fix-publish
Fix publish workflow
2 parents ca5f7fb + 097e99e commit 1fec667

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/publish.yaml

+15-6
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,30 @@ name: Publish to NPM
33
on:
44
release:
55
types: [created]
6+
workflow_dispatch:
67

78
permissions:
89
contents: read
910

1011
jobs:
11-
publish-npm:
12+
test:
1213
runs-on: ubuntu-latest
1314
steps:
14-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
15-
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
15+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
16+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
1617
with:
17-
node-version: 14
18-
registry-url: https://registry.npmjs.org/
18+
node-version: 22.x
1919
- run: npm i
20-
- run: node test/validateModuleExportsMatchCommonJS/index.js
20+
- run: node ./test/runTests.js
21+
22+
publish-npm:
23+
runs-on: ubuntu-latest
24+
needs: test
25+
steps:
26+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
27+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
28+
with:
29+
node-version: 22.x
2130
- run: npm publish
2231
env:
2332
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)