File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish package to NPM
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - master
8+
9+ jobs :
10+ publish :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v2
14+ - uses : actions/setup-node@v1
15+ with :
16+ node-version : 18
17+ registry-url : https://registry.npmjs.org/
18+
19+ - run : yarn
20+ - run : yarn build
21+ - run : yarn publish --access=public --tag=next
22+ env :
23+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
24+
25+ - name : Get package info
26+ id : package
27+ uses : codex-team/action-nodejs-package-info@v1.1
28+
29+ - name : Add LATEST tag for the published package if this is not a -rc version
30+ if : steps.package.outputs.is-release-candidate == 'false'
31+ run : npm dist-tag add ${{ steps.package.outputs.name }}@${{ steps.package.outputs.version }} latest
32+ env :
33+ NODE_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
34+
35+ # notify:
36+ # needs: publish
37+ # runs-on: ubuntu-latest
38+ # steps:
39+ # - uses: actions/checkout@v2
40+ # - name: Get package info
41+ # id: package
42+ # uses: codex-team/action-nodejs-package-info@v1
43+ # - name: Send a message
44+ # uses: codex-team/action-codexbot-notify@v1
45+ # with:
46+ # webhook: ${{ secrets.CODEX_BOT_WEBHOOK_FRONTEND }}
47+ # message: '📦 [${{ steps.package.outputs.name }}](${{ steps.package.outputs.npmjs-link }}) ${{ steps.package.outputs.version }} was published'
48+ # parse_mode: 'markdown'
49+ # disable_web_page_preview: true
You can’t perform that action at this time.
0 commit comments