Skip to content

Commit

Permalink
Merge pull request #1930 from o1-labs/2024-11-automatically-tag-releases
Browse files Browse the repository at this point in the history
2024 11 automatically tag releases
  • Loading branch information
45930 authored Dec 2, 2024
2 parents eee5d2f + 99549d4 commit bc9435e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,25 @@ jobs:
run: |
npm ci
npm run prepublishOnly
- name: Publish to NPM if version has changed
id: publish
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
strategy: upgrade
env:
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Tag new version
if: ${{ steps.publish.outputs.type }} # https://github.com/JS-DevTools/npm-publish?tab=readme-ov-file#action-output
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASED_VERSION: ${{ steps.publish.outputs.version }}
run: |
git tag $RELEASED_VERSION
git push origin $RELEASED_VERSION
Release-mina-signer-on-NPM:
if: github.ref == 'refs/heads/main'
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ jobs:
git add CHANGELOG.md
git commit -m "Update CHANGELOG for new version $NEW_VERSION"
- name: Delete existing release tag
run: |
if git rev-parse $NEW_VERSION >/dev/null 2>&1; then
git tag -d $NEW_VERSION
git push origin :refs/tags/$NEW_VERSION
fi
- name: Delete existing release branch
run: |
if git ls-remote --heads origin release/${NEW_VERSION} | grep release/${NEW_VERSION}; then
Expand Down

0 comments on commit bc9435e

Please sign in to comment.