forked from maidsafe/self_encryption
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 969 Bytes
/
github_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Create GitHub Release
on:
push:
tags:
- 'v*'
jobs:
release:
# only if we have a tag
name: Release
runs-on: ubuntu-20.04
if: "startsWith(github.event.head_commit.message, 'chore(release):')"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Set tag as env
shell: bash
run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
- name: lets check tag
shell: bash
run: echo ${{ env.RELEASE_VERSION }}
- name: Generate Changelog
shell: bash
run: awk '/# \[/{c++;p=1}{if(c==2){exit}}p;' CHANGELOG.md > RELEASE-CHANGELOG.txt
- run: cat RELEASE-CHANGELOG.txt
- name: Release generation
uses: softprops/action-gh-release@91409e712cf565ce9eff10c87a8d1b11b81757ae
env:
GITHUB_TOKEN: ${{ secrets.MERGE_BUMP_BRANCH_TOKEN }}
with:
body_path: RELEASE-CHANGELOG.txt