Skip to content

Commit

Permalink
Update workflow (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelirh authored Apr 30, 2024
1 parent 447f7c4 commit a03009e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release-repository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
runs-on: ubuntu-22.04
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAIN_BRANCH: ros2
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -78,3 +79,23 @@ jobs:
gh release create ${{ steps.create_release_candidate.outputs.version }} \
--title ${{ github.event.inputs.release_name }} \
--notes-from-tag
- name: Create pull request to main branch
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH }}
run: |
gh pr create \
--base ${{ env.MAIN_BRANCH }} \
--head ${{ github.event.inputs.target_branch }} \
--title "Release ${{ steps.create_release_candidate.outputs.version}} to main"
- name: Checkout to main
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && github.event.inputs.automatic_mode == true }}
uses: actions/checkout@v4
with:
ref: ${{ env.MAIN_BRANCH }}

- name: Merge pull request
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && github.event.inputs.automatic_mode == true }}
run: |
gh pr merge ${{ github.event.inputs.target_branch }} \
--delete-branch

0 comments on commit a03009e

Please sign in to comment.