-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (36 loc) · 1.2 KB
/
create-release.yml
File metadata and controls
44 lines (36 loc) · 1.2 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
name: Create Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get current date
id: get_date
run: echo "::set-output name=DATE::$(date +'%Y-%m-%d')"
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@v1.0.0
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Get the changelog
run: echo "${{ steps.changelog.outputs.changelog }}"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.get_version.outputs.VERSION }} - ${{ steps.get_date.outputs.DATE }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false