Skip to content

Commit

Permalink
Ros2 workflow missing arguments (#49)
Browse files Browse the repository at this point in the history
* Add missing merge arg

* Fix release workflow

* Rename steps

* Fix prerelease step
  • Loading branch information
pawelirh authored May 1, 2024
1 parent 210662a commit a914997
Showing 1 changed file with 24 additions and 29 deletions.
53 changes: 24 additions & 29 deletions .github/workflows/release-repository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,47 +56,42 @@ jobs:
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true }}
run: |
gh pr merge ${{ steps.create_release_candidate.outputs.created_branch }} \
--delete-branch
--merge --delete-branch
- name: Create tag
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true }}
- name: Checkout to main
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
uses: actions/checkout@v4
with:
ref: ${{ env.MAIN_BRANCH }}

- name: Create pull request to main
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
run: |
git checkout ${{ github.event.inputs.target_branch }}
git tag ${{ steps.create_release_candidate.outputs.version }}
git push origin ${{ steps.create_release_candidate.outputs.version }}
gh pr create \
--base ${{ env.MAIN_BRANCH }} \
--head ${{ github.event.inputs.target_branch }} \
--title "Release ${{ steps.create_release_candidate.outputs.version}} to ${{ env.MAIN_BRANCH }}" \
--body "This PR incorporates package(s) version and changelog update."
- name: Merge pull request to main
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
run: |
gh pr merge ${{ github.event.inputs.target_branch }} \
--merge --delete-branch
- name: Create prerelease
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true && fromJSON(github.event.inputs.prerelease) == true}}
run: |
gh release create ${{ steps.create_release_candidate.outputs.version }} \
--target ${{ env.MAIN_BRANCH }} \
--title ${{ github.event.inputs.release_name }} \
--notes-from-tag \
--generate-notes \
--prerelease
- name: Create release
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true && fromJSON(github.event.inputs.prerelease) == false}}
run: |
gh release create ${{ steps.create_release_candidate.outputs.version }} \
--target ${{ env.MAIN_BRANCH }} \
--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 && fromJSON(github.event.inputs.automatic_mode) == true }}
run: |
gh pr create \
--base ${{ env.MAIN_BRANCH }} \
--head ${{ github.event.inputs.target_branch }} \
--title "Release ${{ steps.create_release_candidate.outputs.version}} to main" \
--body "This PR incorporates package(s) version and changelog update."
- name: Checkout to main
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(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 && fromJSON(github.event.inputs.automatic_mode) == true }}
run: |
gh pr merge ${{ github.event.inputs.target_branch }} \
--delete-branch
--generate-notes

0 comments on commit a914997

Please sign in to comment.