File tree Expand file tree Collapse file tree 3 files changed +8982
-1262
lines changed Expand file tree Collapse file tree 3 files changed +8982
-1262
lines changed Original file line number Diff line number Diff line change 1515 strategy :
1616 matrix :
1717 node-version :
18- - 14.x
1918 - 16.x
19+ - 18.x
2020 steps :
2121 - uses : actions/checkout@v2
2222 - name : Use Node.js ${{ matrix.node-version }}
2828 - run : npm test
2929 - run : npm run build --if-present
3030 - name : Save build
31- if : matrix.node-version == '14 .x'
31+ if : matrix.node-version == '16 .x'
3232 uses : actions/upload-artifact@v2
3333 with :
3434 name : build
4545 name : build
4646 - uses : actions/setup-node@v1
4747 with :
48- node-version : 14 .x
48+ node-version : 16 .x
4949 -
uses :
rlespinasse/[email protected] 5050 - name : Append commit hash to package version
5151 run : ' sed -i -E "s/(\"version\": *\"[^\"]+)/\1-${GITHUB_SHA_SHORT}/" package.json'
5656 token : ${{ secrets.NPM_TOKEN }}
5757 tag : ${{ env.GITHUB_REF_SLUG }}
5858
59+ npm-publish-latest :
60+ needs : build
61+ runs-on : ubuntu-latest
62+ if : github.ref == 'refs/heads/main'
63+ steps :
64+ - uses : actions/download-artifact@v2
65+ with :
66+ name : build
67+ - uses : actions/setup-node@v1
68+ with :
69+ node-version : 16.x
70+ - name : Disable pre- and post-publish actions
71+ run : ' sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
72+ - uses : JS-DevTools/npm-publish@v1
73+ with :
74+ token : ${{ secrets.NPM_TOKEN }}
75+ tag : latest
You can’t perform that action at this time.
0 commit comments