File tree Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change 33 release :
44 types : [created]
55jobs :
6+ var :
7+ name : Set variables
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Set variables
11+ id : var
12+ run : |
13+ TAG="$(git describe --tags)" && echo "tag=${TAG#v}" >> $GITHUB_OUTPUT
14+ outputs :
15+ tag : ${{ steps.var.outputs.tag }}
616 build :
17+ name : Build
18+ needs : var
719 runs-on : ubuntu-latest
820 steps :
921 - uses : actions/checkout@v4
1022 - uses : actions/setup-node@v4
1123 with :
1224 registry-url : ' https://npm.pkg.github.com'
1325 scope : ' @mutablelogic'
14- - run : npm install
15- - run : npm run build
16- - run : npm publish
26+ - name : Publish
27+ run : |
28+ npm ci
29+ npm version ${{ needs.var.outputs.tag }} --no-git-tag-version --allow-same-version
30+ npm run build
31+ npm publish
1732 env :
1833 NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19- delete :
20- needs : build
21- runs-on : ubuntu-latest
22- steps :
23- - uses : actions/delete-package-versions@v5
24- with :
25- package-name : js-framework
26- package-type : ' npm'
27- num-old-versions-to-delete : 1
28- min-versions-to-keep : 2
You can’t perform that action at this time.
0 commit comments