Skip to content

Commit 245da0b

Browse files
committed
Auto release on tag
1 parent e17258d commit 245da0b

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,39 @@ jobs:
3636
with:
3737
commit_message: Update Changelog for tag ${{ env.CURRENT_VERSION }}
3838
file_pattern: CHANGELOG.md
39+
40+
release_notes:
41+
name: Create Release Notes
42+
runs-on: ubuntu-latest
43+
needs: changelog
44+
steps:
45+
- name: Get version from tag
46+
env:
47+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
48+
GITHUB_REF: ${{ github.ref }}
49+
run: |
50+
export CURRENT_VERSION=${GITHUB_TAG/refs\/tags\/v/}
51+
echo "::set-env name=CURRENT_VERSION::$CURRENT_VERSION"
52+
- name: Checkout code
53+
uses: actions/checkout@v2
54+
with:
55+
ref: main
56+
57+
- name: Get Changelog Entry
58+
id: changelog_reader
59+
uses: mindsers/changelog-reader-action@v1
60+
with:
61+
version: ${{ env.CURRENT_VERSION }}
62+
path: ./CHANGELOG.md
63+
64+
- name: Create Release
65+
id: create_release
66+
uses: actions/create-release@v1
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
69+
with:
70+
tag_name: ${{ github.ref }}
71+
release_name: Release ${{ github.ref }}
72+
body: ${{ steps.changelog_reader.outputs.log_entry }}
73+
draft: false
74+
prerelease: false

0 commit comments

Comments
 (0)