Skip to content

Commit 8a63418

Browse files
committed
chore: add workflow for releases
1 parent 9f6b08d commit 8a63418

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v*'
5+
6+
name: release
7+
8+
jobs:
9+
build:
10+
name: Create Release
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: Set env
18+
run: |
19+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
20+
echo "RELEASE_NAME=${GITHUB_EVENT_REPOSITORY_NAME}-${RELEASE_VERSION}" >> $GITHUB_ENV
21+
22+
- name: Create changelog
23+
run: |
24+
./.get_latest_changes_for_release_notes.sh > ./${RELEASE_NAME}.md
25+
26+
- name: Create Release
27+
uses: actions/create-release@v1
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
with:
31+
tag_name: ${{ github.ref }}
32+
release_name: ${{ env.RELEASE_VERSION }}
33+
body_path: ./${{ env.RELEASE_NAME }}.md
34+
draft: false
35+
prerelease: false

0 commit comments

Comments
 (0)