-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.27 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
42
43
44
45
46
47
48
49
50
51
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
generate-changelog:
name: Generate changelog
runs-on: ubuntu-22.04
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate a latest changelog
uses: orhun/git-cliff-action@v3
id: git-cliff
with:
config: cliff.toml
args: --verbose --latest
- name: Push the changelog into release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body: ${{ steps.git-cliff.outputs.content }}
- name: Generate a latest changelog
uses: orhun/git-cliff-action@v3
id: git-cliff-full
with:
config: cliff.toml
args: --verbose
- name: Push new changelog
run: |
git checkout develop
echo '${{ steps.git-cliff-full.outputs.content }}' > CHANGELOG.md
git config --global user.name "Mirio"
git config --global user.email "[email protected]"
git add CHANGELOG.md
git commit -m "Adding full changelog"
git push