Skip to content

Commit 37bb5cf

Browse files
authored
Adding release workflow when a tag is pushed. (#7)
Adding release workflow when a tag is pushed to the repo.
1 parent bf31aa9 commit 37bb5cf

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
6+
7+
name: Create Release
8+
9+
jobs:
10+
build:
11+
name: Create Release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
- name: Get release notes
17+
id: release_notes
18+
run: echo ::set-output name=notes::$(git log -1 --pretty=format:"%b")
19+
- name: Create Release
20+
id: create_release
21+
uses: actions/create-release@v1
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
24+
with:
25+
tag_name: ${{ github.ref }}
26+
release_name: Release ${{ github.ref }}
27+
body: |
28+
Changes in this Release
29+
${{ steps.release_notes.outputs.notes }}
30+
draft: false
31+
prerelease: false

0 commit comments

Comments
 (0)