Skip to content

Commit 2ab40bb

Browse files
committed
chore: update release workflow
1 parent 26fd836 commit 2ab40bb

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
name: Create release
22

33
on:
4-
create:
4+
push:
55
tags:
6-
- 'v*.*'
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
77

88
jobs:
99
release:
1010
name: Release on GitHub
11-
runs-on: ubuntu-18.04
12-
if: contains(github.ref, '.')
11+
runs-on: ubuntu-20.04
12+
permissions:
13+
contents: write
1314
steps:
15+
- name: Get release information
16+
id: release_info
17+
run: |
18+
echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}
19+
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
1420
- name: Create GitHub release
15-
id: create_release
16-
uses: actions/create-release@v1
17-
env:
18-
GITHUB_TOKEN: ${{ github.token }}
21+
uses: softprops/action-gh-release@v1
1922
with:
20-
tag_name: ${{ github.ref }}
21-
release_name: ${{ github.ref }}
23+
tag_name: ${{ steps.release_info.outputs.TAG }}
24+
name: ${{ steps.release_info.outputs.TAG }}
2225
body: >
2326
Learn more about this release from the [changelog](https://github.com/dessant/lock-threads/blob/master/CHANGELOG.md#changelog).

0 commit comments

Comments
 (0)