File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,18 @@ jobs:
1212 runs-on : ubuntu-latest
1313
1414 steps :
15+ - name : Determine target branch
16+ id : branch
17+ run : |
18+ # Extract major version from tag (v4.0.1 -> 4.x)
19+ TAG="${{ github.event.release.tag_name }}"
20+ MAJOR=$(echo "$TAG" | sed -E 's/^v([0-9]+)\..*/\1/')
21+ echo "name=${MAJOR}.x" >> $GITHUB_OUTPUT
22+
1523 - name : Checkout code
1624 uses : actions/checkout@v6
1725 with :
18- ref : main
26+ ref : ${{ steps.branch.outputs.name }}
1927
2028 - name : Update Changelog
2129 uses : stefanzweifel/changelog-updater-action@v1
2634 - name : Commit updated CHANGELOG
2735 uses : stefanzweifel/git-auto-commit-action@v7
2836 with :
29- branch : main
37+ branch : ${{ steps.branch.outputs.name }}
3038 commit_message : Update CHANGELOG
3139 file_pattern : CHANGELOG.md
You can’t perform that action at this time.
0 commit comments