@@ -73,23 +73,38 @@ jobs:
73
73
steps :
74
74
- uses : actions/checkout@v4
75
75
with :
76
+ ref : release
76
77
fetch-depth : 0
77
78
persist-credentials : false
78
- - name : Python Semantic Release
79
- id : release
80
- uses :
python-semantic-release/[email protected]
79
+ - name : Set up GitHub CLI
80
+ uses : actions/setup-gh@v2
81
81
with :
82
- github_token : ${{ secrets.DEPLOY_KEY }}
82
+ token : ${{ secrets.GH_TOKEN }}
83
83
84
- - name : Publish package distributions to PyPI
85
-
84
+ - name : Configure Git
85
+ run : |
86
+ git config user.name "${{ github.actor }}"
87
+ git config user.email "${{ github.actor }}@users.noreply.github.com"
86
88
87
- # NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
88
- # See https://github.com/actions/runner/issues/1173
89
- if : steps.release.outputs.released == 'true'
89
+ # - name: Python Semantic Release
90
+ # id: release
91
+ # uses: python-semantic-release/[email protected]
92
+ # with:
93
+ # github_token: ${{ secrets.GH_TOKEN }}
94
+ # commit_author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
95
+ # push: false
90
96
91
- - name : Publish package distributions to GitHub Releases
92
- uses :
python-semantic-release/[email protected]
93
- if : steps.release.outputs.released == 'true'
94
- with :
95
- github_token : ${{ secrets.DEPLOY_KEY }}
97
+ - name : Create Release Branch and MR
98
+ # if: steps.release.outputs.released == 'true'
99
+ run : |
100
+ # Create a release branch
101
+ RELEASE_BRANCH="release/${{ steps.release.outputs.version }}"
102
+ git checkout -b "$RELEASE_BRANCH"
103
+ git push origin "$RELEASE_BRANCH"
104
+
105
+ # Create a merge request using GitHub CLI
106
+ gh pr create \
107
+ --base main \
108
+ --head "$RELEASE_BRANCH" \
109
+ --title "Release ${{ steps.release.outputs.version }}" \
110
+ --body "This MR contains the latest release changes for version ${{ steps.release.outputs.version }}."
0 commit comments