Skip to content

Commit 9e7aa04

Browse files
committed
workflow: auto create gh release tag in release
1 parent a6c4113 commit 9e7aa04

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

.github/workflows/release.yml

+19-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ on:
2929
type: string
3030

3131
jobs:
32-
publish:
32+
release:
3333
# prevents this action from running on forks
3434
if: github.repository == 'vuejs/core'
3535
runs-on: ubuntu-latest
@@ -45,7 +45,7 @@ jobs:
4545
ref: ${{ inputs.branch }}
4646

4747
- name: Install pnpm
48-
uses: pnpm/action-setup@v2
48+
uses: pnpm/action-setup@v4
4949

5050
- name: Install Node.js
5151
uses: actions/setup-node@v4
@@ -62,10 +62,25 @@ jobs:
6262
git config user.name "vue-bot"
6363
git config user.email "<[email protected]>"
6464
65-
- name: Release
66-
run: pnpm release ${{ inputs.bump != 'custom' && inputs.bump || inputs.custom_version }} --skipPrompts
65+
- name: Run release script
66+
id: release
67+
run: |
68+
pnpm release ${{ inputs.bump != 'custom' && inputs.bump || inputs.custom_version }} --skipPrompts
69+
RELEASE_TAG=$(git describe --tags --abbrev=0)
70+
echo "tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
6771
env:
6872
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6973

7074
- name: Push tags
7175
run: git push -u origin ${{ inputs.branch }} --follow-tags
76+
77+
- name: Create Release for Tag
78+
id: release_tag
79+
uses: yyx990803/release-tag@master
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
with:
83+
tag_name: ${{ steps.release.outputs.tag }}
84+
body: |
85+
For stable releases, please refer to [CHANGELOG.md](https://github.com/vuejs/core/blob/main/CHANGELOG.md) for details.
86+
For pre-releases, please refer to [CHANGELOG.md](https://github.com/vuejs/core/blob/minor/CHANGELOG.md) of the `minor` branch.

0 commit comments

Comments
 (0)