@@ -92,20 +92,34 @@ jobs:
9292 # push: false
9393 # commit_author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
9494
95- - name : Create Release Branch and MR
96- # if: steps.release.outputs.released == 'true'
95+ - name : Install GitHub CLI
9796 run : |
98- # Create a release branch
99- RELEASE_BRANCH="release/${{ steps.release.outputs.version }}"
97+ sudo apt update
98+ sudo apt install -y gh
99+
100+ - name : Authenticate GitHub CLI
101+ env :
102+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
103+ run : |
104+ echo "${{ secrets.GH_TOKEN }}" | gh auth login --with-token
105+
106+ - name : Prepare Release with Semantic Release
107+ id : release
108+ run : |
109+ RELEASE_BRANCH="release/$(python-semantic-release version --noop)"
100110 git checkout -b "$RELEASE_BRANCH"
111+ python-semantic-release changelog
112+ git add .
113+ git commit -m "chore(release): prepare release $(python-semantic-release version --noop)"
101114 git push origin "$RELEASE_BRANCH"
102115
103- # Create a merge request using GitHub CLI
116+ - name : Create Merge Request
117+ run : |
104118 gh pr create \
105119 --base main \
106120 --head "$RELEASE_BRANCH" \
107- --title "Release ${{ steps. release.outputs. version }} " \
108- --body "This MR contains the latest release changes for version ${{ steps. release.outputs. version }} ."
121+ --title "Release $(python-semantic- release version --noop) " \
122+ --body "This PR contains the release changes for version $(python-semantic- release version --noop) ."
109123 # - name: Publish package distributions to PyPI
110124 # uses: pypa/gh-action-pypi-publish@v1.12.2
111125 # if: steps.release.outputs.released == 'true'
0 commit comments