1- name : Create a new GitHub Release
1+ name : Create a Release Pull Request
22
33on :
44 workflow_dispatch :
55 inputs :
6- tag :
6+ bump-type :
77 description : " The type of version bump"
88 required : true
99 type : choice
1313 - " patch"
1414
1515jobs :
16- release :
16+ create- release-pr :
1717 runs-on : ubuntu-latest
1818 env :
19- TAG : ${{ github.event.inputs.tag }}
19+ BUMP_TYPE : ${{ github.event.inputs.bump-type }}
2020
2121 steps :
2222 - name : Checkout
@@ -27,37 +27,35 @@ jobs:
2727 with :
2828 python-version : 3.11
2929
30- - name : Install requirements
30+ - name : Install release requirements
3131 run : pip install scriv bump-my-version
3232
33- - name : Install pandoc for scriv
34- run : sudo apt install -y pandoc
35-
36- - name : Set up Git
33+ - name : Configure Git user
3734 run : |
3835 git config user.name 'github-actions[bot]'
3936 git config user.email 'github-actions[bot]@users.noreply.github.com'
4037
41- - name : Get current and new version
38+ - name : Compute version bump
4239 id : version
4340 run : |
4441 echo "CURRENT_VERSION=$(bump-my-version show current_version)" >> $GITHUB_OUTPUT
45- echo "NEW_VERSION=$(bump-my-version show --increment $TAG new_version)" >> $GITHUB_OUTPUT
42+ echo "NEW_VERSION=$(bump-my-version show --increment $BUMP_TYPE new_version)" >> $GITHUB_OUTPUT
4643
4744 - name : Bump version
48- run : bump-my-version bump $TAG
45+ run : bump-my-version bump $BUMP_TYPE
4946
5047 - name : Collect changelog
5148 run : make changelog
5249
53- - name : Commit changes and create tag
54- uses : stefanzweifel/git-auto-commit-action@v5
50+ - name : Create Pull Request
51+ uses : peter-evans/create-pull-request@v7
5552 with :
56- branch : ${{ github.ref }}
57- commit_message : " chore: bump version ${{ steps.version.outputs.CURRENT_VERSION }} → ${{ steps.version.outputs.NEW_VERSION }}"
58- tagging_message : " v${{ steps.version.outputs.NEW_VERSION }}"
59-
60- - name : Create GitHub release
61- run : scriv github-release --repo=openedx/openedx-events
62- env :
63- GITHUB_TOKEN : ${{ github.token }}
53+ commit-message : " chore: bump version ${{ steps.version.outputs.CURRENT_VERSION }} → ${{ steps.version.outputs.NEW_VERSION }}"
54+ title : " v${{ steps.version.outputs.NEW_VERSION }} Release"
55+ body : |
56+ ### Description
57+
58+ This PR bumps the version from `${{ steps.version.outputs.CURRENT_VERSION }}` to `${{ steps.version.outputs.NEW_VERSION }}`.
59+
60+ The changelog has been automatically generated using `scriv`.
61+ branch : " release-${{ steps.version.outputs.NEW_VERSION }}"
0 commit comments