-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (34 loc) · 1.15 KB
/
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
39
40
name: release
on:
push:
tags:
- 'v*' # Wait for push events with tags matching v*, e.g. v1.0, v20.15.10, v0.3.1
jobs:
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@v2
- name: Generate release notes # To change the release notes format, edit RELEASE.md.hbs
id: notes
run: |
npx auto-changelog@2.x.x --template RELEASE.md.hbs --output RELEASE.md --commit-limit false
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.notes.outputs.notes }}
draft: false
prerelease: false