File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 11# .github/workflows/npm-publish.yml
2- name : Publish to NPM
2+ name : Build and Publish
33
44on :
55 push :
2020 - uses : actions/checkout@v3
2121 - uses : actions/setup-node@v3
2222 with :
23- node-version : ' 16 .x'
23+ node-version : ' 18 .x'
2424 registry-url : ' https://registry.npmjs.org'
2525
2626 - name : Install dependencies
3434
3535 - name : Build
3636 run : npm run build
37+
38+ publish :
39+ needs : build
40+ if : github.event_name == 'release'
41+ runs-on : ubuntu-latest
42+ steps :
43+ - uses : actions/checkout@v3
44+ - uses : actions/setup-node@v3
45+ with :
46+ node-version : ' 18.x'
47+ registry-url : ' https://registry.npmjs.org'
48+
49+ - name : Install dependencies
50+ run : npm ci
51+
52+ - name : Build
53+ run : npm run build
3754
3855 - name : Publish to NPM
3956 run : npm publish
You can’t perform that action at this time.
0 commit comments