Skip to content

Commit

Permalink
ci: bring back auto-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
radiovisual committed Oct 20, 2024
1 parent 1b1f7ea commit f03b8ef
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Show diff for debugging
run: git diff

# Create a Pull Request with the version bump if the release is not a pre-release
- name: Create Pull Request for Version Bump
if: success() && env.IS_PRE_RELEASE == 'false'
Expand All @@ -56,3 +59,20 @@ jobs:
labels: version-bump
token: ${{ secrets.GITHUB_TOKEN }}
base: main

# Auto-merge the Pull Request with the version bump if the release is not a pre-release
- name: Enable Auto-Merge
if: success() && env.IS_PRE_RELEASE == 'false'
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ steps.create_pull_request.outputs.pull-request-number }}
token: ${{ secrets.GITHUB_TOKEN }}
merge-method: squash

# Clean up the version bump branch after merge
- name: Delete Version Bump Branch
if: success() && env.IS_PRE_RELEASE == 'false'
run: |
git push origin --delete version-bump/${{ env.RELEASE_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit f03b8ef

Please sign in to comment.