-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (38 loc) · 1.26 KB
/
changelog.yml
File metadata and controls
44 lines (38 loc) · 1.26 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
name: Auto Changelog
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: write
pull-requests: read
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: true
- name: Configure Git merge driver for pnpm-lock.yaml
run: |
# Configure custom merge driver for pnpm-lock.yaml
# This allows Git to automatically resolve lockfile conflicts by regenerating it
git config merge.pnpm-merge.name "pnpm-lock.yaml merge driver"
git config merge.pnpm-merge.driver "pnpm install --no-frozen-lockfile"
- name: Generate changelog
uses: orhun/git-cliff-action@v4
id: changelog
with:
config: cliff.toml
args: --verbose --latest
env:
OUTPUT: CHANGELOG.md
- name: Commit changelog
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add CHANGELOG.md
git commit -m "docs: update CHANGELOG.md for ${{ github.event.release.tag_name }}" || echo "No changes to commit"
git push