File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -301,13 +301,25 @@ jobs:
301301 run : |
302302 npm ci
303303 npm run prepublishOnly
304+
304305 - name : Publish to NPM if version has changed
306+ id : publish
305307 uses : JS-DevTools/npm-publish@v3
306308 with :
307309 token : ${{ secrets.NPM_TOKEN }}
308310 strategy : upgrade
309311 env :
310312 INPUT_TOKEN : ${{ secrets.NPM_TOKEN }}
313+
314+ - name : Tag new version
315+ if : ${{ steps.publish.outputs.type }} # https://github.com/JS-DevTools/npm-publish?tab=readme-ov-file#action-output
316+ env :
317+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
318+ RELEASED_VERSION : ${{ steps.publish.outputs.version }}
319+ run : |
320+ git tag $RELEASED_VERSION
321+ git push origin $RELEASED_VERSION
322+
311323
312324 Release-mina-signer-on-NPM :
313325 if : github.ref == 'refs/heads/main'
Original file line number Diff line number Diff line change 5858 git add CHANGELOG.md
5959 git commit -m "Update CHANGELOG for new version $NEW_VERSION"
6060
61- - name : Delete existing release tag
62- run : |
63- if git rev-parse $NEW_VERSION >/dev/null 2>&1; then
64- git tag -d $NEW_VERSION
65- git push origin :refs/tags/$NEW_VERSION
66- fi
67-
6861 - name : Delete existing release branch
6962 run : |
7063 if git ls-remote --heads origin release/${NEW_VERSION} | grep release/${NEW_VERSION}; then
You can’t perform that action at this time.
0 commit comments