Skip to content

Commit 1a15a9a

Browse files
committed
chore: Add release workflow
1 parent cab87af commit 1a15a9a

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish GitHub Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
push_to_registry:
10+
name: Push GitHub Release
11+
if: github.ref_type == 'tag'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout git repo
15+
uses: actions/checkout@v3
16+
17+
- name: Automated Version Bump
18+
id: changelog
19+
uses: Requarks/changelog-action@v1
20+
with:
21+
token: ${{secrets.GIT_TOKEN}}
22+
tag: ${{github.ref_name}}
23+
writeToFile: 'false'
24+
25+
- name: Get variables
26+
id: get_variables
27+
run: |
28+
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
29+
echo ::set-output name=IS_PRERELEASE::"${{contains(github.ref, 'dev')}}"
30+
31+
- name: Publish release github
32+
uses: softprops/action-gh-release@v1
33+
with:
34+
token: ${{secrets.GIT_TOKEN}}
35+
prerelease: ${{steps.get_variables.outputs.IS_PRERELEASE}}
36+
tag_name: ${{steps.get_variables.outputs.VERSION}}
37+
body: ${{steps.changelog.outputs.changes}}

0 commit comments

Comments
 (0)