-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (49 loc) · 1.39 KB
/
changelog.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
name: Changelog
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
jobs:
unreleased-changes:
name: Unreleased Changes
runs-on: ubuntu-22.04
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: orhun/git-cliff-action@main
id: git-cliff
with:
config: cliff.toml
args: -vv --unreleased --strip header
- name: Output Step Summary
run: |
echo "${{ steps.git-cliff.outputs.content }}" >> $GITHUB_STEP_SUMMARY
update-changelog:
name: Update Changelog
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: orhun/git-cliff-action@main
id: git-cliff
with:
config: cliff.toml
args: -vv
env:
OUTPUT: "CHANGELOG.md"
- name: Push Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update changelog"
commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json