Skip to content

Commit a166187

Browse files
committed
chore: Update release workflow to include version number in the release name
1 parent d6a213c commit a166187

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

.github/workflows/release.yaml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
1+
name: Release
2+
13
on:
24
push:
3-
# Sequence of patterns matched against refs/tags
45
tags:
5-
- 'v*' # Push events to matching v*, i.e. v1.0, v1.0.0
6-
7-
name: Release
6+
- "v*.*.*"
87

98
jobs:
10-
release:
11-
name: Release
9+
build:
1210
runs-on: ubuntu-latest
1311
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v2
16-
- name: Create Release
17-
id: create_release
18-
uses: actions/create-release@v1
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Get the version
16+
id: get_version
17+
if: startsWith(github.ref, 'refs/tags/')
18+
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
19+
20+
- name: Release
21+
uses: softprops/action-gh-release@v2
2122
with:
23+
token: ${{ secrets.GITHUB_TOKEN }}
2224
tag_name: ${{ github.ref }}
23-
release_name: Release ${{ github.ref }}
25+
name: Release ${{ steps.get_version.outputs.VERSION }}
2426
draft: false
25-
prerelease: false
27+
prerelease: false
28+
generate_release_notes: true

0 commit comments

Comments
 (0)