@@ -10,30 +10,47 @@ jobs:
1010 build :
1111 permissions :
1212 contents : write
13-
13+ pull-requests : write
14+
1415 runs-on : ubuntu-latest
1516
1617 steps :
17- # Step 1: Check out your repository's code
1818 - name : Checkout Code
1919 uses : actions/checkout@v4
2020 with :
2121 fetch-depth : 0
2222
23- # Step 2: Generate the changelog
2423 - name : Generate Changelog
24+ id : changelog
2525 uses : TriPSs/conventional-changelog-action@v5
2626 with :
2727 github-token : ${{ secrets.GITHUB_TOKEN }}
2828 output-file : " CHANGELOG.md"
2929 preset : ' angular'
30- # point to custom config file
31- # config-file-path: "./changelog-config.js"
32-
30+ git-push : ' false'
3331
34- # Step 3: Commit and push the updated CHANGELOG.md
35- - name : Commit Updated Changelog
36- uses : stefanzweifel/git-auto-commit-action@v5
32+ - name : Create Pull Request
33+ # This step only runs if the changelog action created a new version
34+ if : steps.changelog.outputs.skipped == 'false'
35+ uses : auto-pr/easy-pull-request@v1
3736 with :
38- commit_message : " chore(docs): update CHANGELOG.md [skip ci]"
39- file_pattern : " CHANGELOG.md"
37+
38+ token : ${{ secrets.GITHUB_TOKEN }}
39+
40+ # The name of the new branch to create
41+ branch : ' changelog/release-v${{ steps.changelog.outputs.version }}'
42+
43+ # The branch to merge into
44+ base_branch : ' main'
45+
46+ # The title of the pull request
47+ title : ' chore(release): v${{ steps.changelog.outputs.version }}'
48+
49+ # The commit message to use
50+ commit_message : ' chore(release): v${{ steps.changelog.outputs.version }}'
51+
52+ # The body of the pull request, using the changelog output
53+ body : |
54+ Automated release PR for v${{ steps.changelog.outputs.version }}.
55+
56+ ${{ steps.changelog.outputs.changelog }}
0 commit comments