Skip to content

Commit 7eda86f

Browse files
committed
Release task
1 parent d53b74a commit 7eda86f

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*.*.*'
7+
8+
jobs:
9+
build:
10+
name: Create Release
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Changelog
18+
id: changelog
19+
run: |
20+
contents="$(sed -e '1,/-----/d' -e '/-----/,$d' CHANGELOG.md | sed -e '$ d')"
21+
contents="${contents//'%'/'%25'}"
22+
contents="${contents//$'\n'/'%0A'}"
23+
contents="${contents//$'\r'/'%0D'}"
24+
echo "::set-output name=contents::$contents"
25+
26+
- name: Create Release
27+
id: create_release
28+
uses: actions/create-release@master
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
with:
32+
tag_name: ${{ github.ref }}
33+
release_name: ${{ github.ref }}
34+
body: ${{ steps.changelog.outputs.contents }}
35+
draft: false
36+
prerelease: false

0 commit comments

Comments
 (0)