@@ -73,23 +73,38 @@ jobs:
7373 steps :
7474 - uses : actions/checkout@v4
7575 with :
76+ ref : release
7677 fetch-depth : 0
7778 persist-credentials : false
78- - name : Python Semantic Release
79- id : release
80- uses : python-semantic-release/python-semantic-release@v9.14.0
79+ - name : Set up GitHub CLI
80+ uses : actions/setup-gh@v2
8181 with :
82- github_token : ${{ secrets.DEPLOY_KEY }}
82+ token : ${{ secrets.GH_TOKEN }}
8383
84- - name : Publish package distributions to PyPI
85- uses : pypa/gh-action-pypi-publish@v1.12.2
84+ - name : Configure Git
85+ run : |
86+ git config user.name "${{ github.actor }}"
87+ git config user.email "${{ github.actor }}@users.noreply.github.com"
8688
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/python-semantic-release@v9.14.0
92+ # with:
93+ # github_token: ${{ secrets.GH_TOKEN }}
94+ # commit_author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
95+ # push: false
9096
91- - name : Publish package distributions to GitHub Releases
92- uses : python-semantic-release/upload-to-gh-release@v8.7.0
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