Skip to content

Commit 1d1cafd

Browse files
authored
fix: try
1 parent d0e455a commit 1d1cafd

File tree

1 file changed

+37
-10
lines changed

1 file changed

+37
-10
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,41 @@ jobs:
7474
with:
7575
fetch-depth: 0
7676
persist-credentials: false
77-
- name: Python Semantic Release
78-
id: release
79-
uses: python-semantic-release/python-semantic-release@v9.14.0
77+
- name: Set up GitHub CLI
78+
uses: actions/setup-gh@v2
8079
with:
81-
github_token: ${{ secrets.GH_TOKEN }}
82-
- name: Publish package distributions to PyPI
83-
uses: pypa/gh-action-pypi-publish@v1.12.2
84-
if: steps.release.outputs.released == 'true'
85-
- name: Publish package distributions to GitHub Releases
86-
uses: python-semantic-release/upload-to-gh-release@v8.7.0
87-
if: steps.release.outputs.released == 'true'
80+
token: ${{ secrets.GH_TOKEN }}
81+
82+
- name: Configure Git
83+
run: |
84+
git config user.name "${{ github.actor }}"
85+
git config user.email "${{ github.actor }}@users.noreply.github.com"
86+
87+
# - name: Python Semantic Release
88+
# id: release
89+
# uses: python-semantic-release/python-semantic-release@v9.14.0
90+
# with:
91+
# github_token: ${{ secrets.GH_TOKEN }}
92+
# push: false
93+
# commit_author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
94+
95+
- name: Create Release Branch and MR
96+
# if: steps.release.outputs.released == 'true'
97+
run: |
98+
# Create a release branch
99+
RELEASE_BRANCH="release/${{ steps.release.outputs.version }}"
100+
git checkout -b "$RELEASE_BRANCH"
101+
git push origin "$RELEASE_BRANCH"
102+
103+
# Create a merge request using GitHub CLI
104+
gh pr create \
105+
--base main \
106+
--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 }}."
109+
# - name: Publish package distributions to PyPI
110+
# uses: pypa/gh-action-pypi-publish@v1.12.2
111+
# if: steps.release.outputs.released == 'true'
112+
# - name: Publish package distributions to GitHub Releases
113+
# uses: python-semantic-release/upload-to-gh-release@v8.7.0
114+
# if: steps.release.outputs.released == 'true'

0 commit comments

Comments
 (0)