File tree Expand file tree Collapse file tree 2 files changed +38
-13
lines changed
Expand file tree Collapse file tree 2 files changed +38
-13
lines changed Original file line number Diff line number Diff line change 11name : Release
22on :
33 push :
4- branches :
5- - main
4+ tags :
5+ - ' v*.*.*'
6+
67jobs :
78 build_wasm :
89 name : build for node.js
@@ -20,20 +21,19 @@ jobs:
2021 with :
2122 name : node_lua_with_lrdb
2223 path : node/bin/node_lua_with_lrdb.*
23- release :
24+
25+ publish :
2426 needs : build_wasm
25- name : Release
27+ name : Publish to NPM
2628 runs-on : ubuntu-latest
2729 steps :
2830 - name : Checkout
2931 uses : actions/checkout@v4
30- with :
31- fetch-depth : 0
32- persist-credentials : false
3332 - name : Setup Node.js
3433 uses : actions/setup-node@v4
3534 with :
3635 node-version : 20
36+ registry-url : ' https://registry.npmjs.org'
3737 - name : Download a node_lua_with_lrdb
3838 uses : actions/download-artifact@v4
3939 with :
4343 working-directory : node
4444 - run : npm run bundle
4545 working-directory : node
46- - name : Release
47- env :
48- GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
49- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
50- run : npx semantic-release
46+ - name : Get version from tag
47+ id : get_version
48+ run : echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
49+ - name : Update package version
50+ run : npm version ${{ steps.get_version.outputs.VERSION }} --no-git-tag-version
51+ working-directory : node
52+ - name : Publish to NPM
53+ run : npm publish
5154 working-directory : node
55+ env :
56+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
57+
58+ create_release :
59+ needs : publish
60+ name : Create GitHub Release
61+ runs-on : ubuntu-latest
62+ permissions :
63+ contents : write
64+ steps :
65+ - name : Checkout
66+ uses : actions/checkout@v4
67+ - name : Download artifacts
68+ uses : actions/download-artifact@v4
69+ with :
70+ name : node_lua_with_lrdb
71+ path : artifacts/
72+ - name : Create Release
73+ uses : softprops/action-gh-release@v1
74+ with :
75+ files : artifacts/*
76+ generate_release_notes : true
Original file line number Diff line number Diff line change 11{
22 "name" : " lrdb-debuggable-lua" ,
3- "version" : " 0.6.0" ,
3+ "version" : " 0.6.0-dev " ,
44 "main" : " dist/index" ,
55 "license" : " MIT" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments