generated from filamentphp/plugin-skeleton
-
-
Notifications
You must be signed in to change notification settings - Fork 44
39 lines (32 loc) · 1.01 KB
/
update-changelog.yml
File metadata and controls
39 lines (32 loc) · 1.01 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
name: "Update Changelog"
on:
release:
types: [released]
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Determine target branch
id: branch
run: |
# Extract major version from tag (v4.0.1 -> 4.x)
TAG="${{ github.event.release.tag_name }}"
MAJOR=$(echo "$TAG" | sed -E 's/^v([0-9]+)\..*/\1/')
echo "name=${MAJOR}.x" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ steps.branch.outputs.name }}
- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.name }}
release-notes: ${{ github.event.release.body }}
- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v7
with:
branch: ${{ steps.branch.outputs.name }}
commit_message: Update CHANGELOG
file_pattern: CHANGELOG.md