-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.18 KB
/
Copy pathrelease.yml
File metadata and controls
46 lines (38 loc) · 1.18 KB
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
39
40
41
42
43
44
45
46
name: release
on:
push:
tags:
- 'v*' # Push events for tags matching v*, e.g. v1.0, v20.15.10
jobs:
build:
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # git history won't be fetched without this option
- name: Setup Node
uses: actions/setup-node@v1
- name: Install Dependencies
run: npm install
- name: Generate Release Notes
run: npx auto-changelog --template RELEASE.md.hbs --output RELEASE.md --commit-limit false
- name: Parse Release Notes
id: parse
run: |
NOTES=$(cat RELEASE.md)
NOTES="${NOTES//'%'/'%25'}"
NOTES="${NOTES//$'\n'/'%0A'}"
echo "::set-output name=notes::$NOTES"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.parse.outputs.notes }}
draft: false
prerelease: false