Skip to content

Commit

Permalink
fix: release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
niracler committed Dec 20, 2023
1 parent 0ddc289 commit 97c42c7
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Tag the new version
run: |
VERSION=$(node -p "require('./package.json').version")
git tag v$VERSION
git push origin v$VERSION
- name: Extract version from package.json
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
# 先把version存到环境变量中以便后续使用

- name: Bump version and push tag
uses: mathieudutour/github-tag-action@v5
id: ${{ env.VERSION }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}


- name: Create GitHub Release
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit 97c42c7

Please sign in to comment.