-
Notifications
You must be signed in to change notification settings - Fork 152
54 lines (48 loc) · 1.38 KB
/
changelog.yaml
File metadata and controls
54 lines (48 loc) · 1.38 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
name: Changelog
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
version:
description: "Version tag to generate changelog for (e.g. v1.0.0)"
required: true
type: string
permissions:
contents: write
jobs:
changelog:
name: Generate Changelog
runs-on: ubuntu-latest
env:
VERSION_TAG: ${{ inputs.version || github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate changelog
uses: orhun/git-cliff-action@v4
id: git-cliff
with:
config: cliff.toml
args: --verbose --tag ${{ env.VERSION_TAG }}
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}
- name: Commit changelog
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add CHANGELOG.md
git commit -m "chore: update changelog for ${{ env.VERSION_TAG }}" || true
git push origin HEAD:main
- name: Create/update GitHub release body
uses: orhun/git-cliff-action@v4
with:
config: cliff.toml
args: --verbose --latest --strip header
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPO: ${{ github.repository }}