Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 29 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,38 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: release
fetch-depth: 0
persist-credentials: false
- name: Python Semantic Release
id: release
uses: python-semantic-release/[email protected]
- name: Set up GitHub CLI
uses: actions/setup-gh@v2
with:
github_token: ${{ secrets.DEPLOY_KEY }}
token: ${{ secrets.GH_TOKEN }}

- name: Publish package distributions to PyPI
uses: pypa/[email protected]
- name: Configure Git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"

# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
# See https://github.com/actions/runner/issues/1173
if: steps.release.outputs.released == 'true'
# - name: Python Semantic Release
# id: release
# uses: python-semantic-release/[email protected]
# with:
# github_token: ${{ secrets.GH_TOKEN }}
# commit_author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
# push: false

- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/[email protected]
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.DEPLOY_KEY }}
- name: Create Release Branch and MR
# if: steps.release.outputs.released == 'true'
run: |
# Create a release branch
RELEASE_BRANCH="release/${{ steps.release.outputs.version }}"
git checkout -b "$RELEASE_BRANCH"
git push origin "$RELEASE_BRANCH"

# Create a merge request using GitHub CLI
gh pr create \
--base main \
--head "$RELEASE_BRANCH" \
--title "Release ${{ steps.release.outputs.version }}" \
--body "This MR contains the latest release changes for version ${{ steps.release.outputs.version }}."
Loading