Skip to content

Commit

Permalink
fix: release workflow to open PR
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren committed Aug 11, 2024
1 parent b4a283d commit 6492421
Showing 1 changed file with 36 additions and 13 deletions.
49 changes: 36 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,41 @@ jobs:
permissions:
id-token: write
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false

- name: Release Keep
uses: python-semantic-release/[email protected]
env:
GH_TOKEN: ${{ secrets.SHAHAR_PAT }}
with:
git_committer_name: Keep Release Bot
git_committer_email: [email protected]
github_token: ${{ secrets.SHAHAR_PAT }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false

- name: Create or update release branch
run: |
git config user.name "Keep Release Bot"
git config user.email "[email protected]"
# Fetch all branches and tags
git fetch --all
# Create or reset the release branch to match the current HEAD
git checkout -B release
- name: Release Keep
uses: python-semantic-release/[email protected]
with:
git_committer_name: Keep Release Bot
git_committer_email: [email protected]
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Push branch
run: |
# Push the release branch to the remote repository, forcing update
git push --force origin release
- name: Open PR for release branch
uses: peter-evans/create-pull-request@v5
with:
branch: release
title: "Release - $(date +'%Y-%m-%d')"
body: "This PR contains the latest release changes."
draft: false

0 comments on commit 6492421

Please sign in to comment.