File tree Expand file tree Collapse file tree 2 files changed +30
-44
lines changed
Expand file tree Collapse file tree 2 files changed +30
-44
lines changed Original file line number Diff line number Diff line change 1- name : release_github
1+ name : release_github_and_npmjs
22
33on :
44 push :
99 workflow_dispatch :
1010
1111jobs :
12- release :
12+ check :
1313 runs-on : ubuntu-latest
1414 permissions :
1515 contents : write
3434 else
3535 echo "changed=true" >> "${GITHUB_OUTPUT}"
3636 fi
37+ env :
38+ GH_TOKEN : ${{ github.token }}
39+
40+ release :
41+ runs-on : ubuntu-latest
42+ needs :
43+ - check
44+ if : ${{ jobs.check.outputs.changed == 'true' }}
45+ permissions :
46+ contents : read
47+ id-token : write
48+ steps :
49+ - name : Checkout
50+ uses : actions/checkout@v5
51+ - name : Setup Node
52+ uses : actions/setup-node@v5
53+ with :
54+ node-version : 24
55+ - name : Update npm
56+ run : npm install -g npm@latest
57+ - name : Install
58+ run : npm install
59+ - name : Check
60+ run : npm run check
3761 - name : Create Release to GitHub
3862 if : ${{ steps.check.outputs.changed == 'true' }}
3963 run : gh release create "v$(jq -r '.version' package.json)" --generate-notes
4064 env :
4165 GH_TOKEN : ${{ github.token }}
66+ - name : Publish to npmjs.com
67+ run : |
68+ npm run build
69+ npm publish
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments