-
Notifications
You must be signed in to change notification settings - Fork 19
76 lines (70 loc) · 1.92 KB
/
Copy pathgithub-changelog-generator.yml
File metadata and controls
76 lines (70 loc) · 1.92 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Release
on:
push:
branches:
- main
- release-/*
tags:
- v*
jobs:
# Other jobs
# ...
changelog:
name: Update Changelog
runs-on: ubuntu-latest
steps:
- name: Get version from tag
env:
GITHUB_REF: $
run: |
export CURRENT_VERSION=${GITHUB_TAG/refs\/tags\/v/}
echo "::set-env name=CURRENT_VERSION::$CURRENT_VERSION"
- name: Checkout code
uses: actions/checkout@v2
with:
ref: main
- name: Update Changelog
uses: heinrichreimer/github-changelog-generator-action@v2.1.1
with:
token: $
issues: true
issuesWoLabels: true
pullRequests: true
prWoLabels: true
addSections: '{"documentation":{"prefix":"**Documentation:**","labels":["documentation"]}}'
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update Changelog for tag $
file_pattern: changelog.md
release_notes:
name: Create Release Notes
runs-on: ubuntu-latest
needs: changelog
steps:
- name: Get version from tag
env:
GITHUB_REF: $
run: |
export CURRENT_VERSION=${GITHUB_TAG/refs\/tags\/v/}
echo "::set-env name=CURRENT_VERSION::$CURRENT_VERSION"
- name: Checkout code
uses: actions/checkout@v2
with:
ref: main
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v1
with:
version: $
path: ./CHANGELOG.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: $ # This token is provided by Actions, you do not need to create your own token
with:
tag_name: $
release_name: Release $
body: $
draft: false
prerelease: false