-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (52 loc) · 1.78 KB
/
auto-release.yaml
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
name: 'Create Release'
on:
push:
branches: ['main']
jobs:
create_release:
runs-on: 'ubuntu-18.04'
name: 'Create Release'
steps:
- name: 'Checkout'
uses: 'actions/checkout@v2'
with:
fetch-depth: 0
- name: 'Get Latest Tag'
id: 'previoustag'
uses: 'WyriHaximus/github-action-get-previous-tag@v1.0.1'
- name: 'Bump version and push tag'
id: 'tag_version'
uses: 'mathieudutour/github-tag-action@v5.2'
with:
github_token: '${{ secrets.PAT_REPO_ONLY }}'
release_branches: 'main'
default_bump: 'patch'
- name: 'Generate incremental changelog'
uses: 'charmixer/auto-changelog-action@v1.2'
with:
token: '${{ secrets.GITHUB_TOKEN }}'
release_branch: 'main'
since_tag: '${{ steps.previoustag.outputs.tag }}'
output: 'release.md'
- name: 'Read incremental changelog'
id: 'changelog'
uses: 'juliangruber/read-file-action@v1'
with:
path: './release.md'
- name: 'Create a GitHub release'
uses: 'actions/create-release@v1'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
tag_name: '${{ steps.tag_version.outputs.new_tag }}'
release_name: '${{ steps.tag_version.outputs.new_tag }}'
body: '${{ steps.changelog.outputs.content }}'
- name: 'Generate changelog'
uses: 'charmixer/auto-changelog-action@v1.2'
with:
token: '${{ secrets.GITHUB_TOKEN }}'
release_branch: 'main'
- uses: 'stefanzweifel/git-auto-commit-action@v4'
with:
commit_message: 'chore: Generating CHANGELOG.md for ${{ steps.tag_version.outputs.new_tag }}'
file_pattern: 'CHANGELOG.md'