Skip to content

Commit bc9435e

Browse files
authored
Merge pull request #1930 from o1-labs/2024-11-automatically-tag-releases
2024 11 automatically tag releases
2 parents eee5d2f + 99549d4 commit bc9435e

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/build-action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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'

.github/workflows/release.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,6 @@ jobs:
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

0 commit comments

Comments
 (0)