-
Notifications
You must be signed in to change notification settings - Fork 16
41 lines (37 loc) · 1.08 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
41
name: Release
on:
push:
tags:
- '*'
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags')
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get release version
id: release_version
run: |
sed -e 's/_version_/'${GITHUB_REF#refs/tags/}'/g' package.json.tmp > package.json
echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
- name: Changelog
uses: scottbrenner/[email protected]
id: changelog
env:
REPO: ${{ github.repository }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.release_version.outputs.version }}
release_name: ${{ steps.release_version.outputs.version }}
body: |
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false