Skip to content

Commit a914997

Browse files
authored
Ros2 workflow missing arguments (#49)
* Add missing merge arg * Fix release workflow * Rename steps * Fix prerelease step
1 parent 210662a commit a914997

File tree

1 file changed

+24
-29
lines changed

1 file changed

+24
-29
lines changed

.github/workflows/release-repository.yaml

+24-29
Original file line numberDiff line numberDiff line change
@@ -56,47 +56,42 @@ jobs:
5656
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true }}
5757
run: |
5858
gh pr merge ${{ steps.create_release_candidate.outputs.created_branch }} \
59-
--delete-branch
59+
--merge --delete-branch
6060
61-
- name: Create tag
62-
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true }}
61+
- name: Checkout to main
62+
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
63+
uses: actions/checkout@v4
64+
with:
65+
ref: ${{ env.MAIN_BRANCH }}
66+
67+
- name: Create pull request to main
68+
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
6369
run: |
64-
git checkout ${{ github.event.inputs.target_branch }}
65-
git tag ${{ steps.create_release_candidate.outputs.version }}
66-
git push origin ${{ steps.create_release_candidate.outputs.version }}
70+
gh pr create \
71+
--base ${{ env.MAIN_BRANCH }} \
72+
--head ${{ github.event.inputs.target_branch }} \
73+
--title "Release ${{ steps.create_release_candidate.outputs.version}} to ${{ env.MAIN_BRANCH }}" \
74+
--body "This PR incorporates package(s) version and changelog update."
75+
76+
- name: Merge pull request to main
77+
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
78+
run: |
79+
gh pr merge ${{ github.event.inputs.target_branch }} \
80+
--merge --delete-branch
6781
6882
- name: Create prerelease
6983
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true && fromJSON(github.event.inputs.prerelease) == true}}
7084
run: |
7185
gh release create ${{ steps.create_release_candidate.outputs.version }} \
86+
--target ${{ env.MAIN_BRANCH }} \
7287
--title ${{ github.event.inputs.release_name }} \
73-
--notes-from-tag \
88+
--generate-notes \
7489
--prerelease
7590
7691
- name: Create release
7792
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true && fromJSON(github.event.inputs.prerelease) == false}}
7893
run: |
7994
gh release create ${{ steps.create_release_candidate.outputs.version }} \
95+
--target ${{ env.MAIN_BRANCH }} \
8096
--title ${{ github.event.inputs.release_name }} \
81-
--notes-from-tag
82-
83-
- name: Create pull request to main branch
84-
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
85-
run: |
86-
gh pr create \
87-
--base ${{ env.MAIN_BRANCH }} \
88-
--head ${{ github.event.inputs.target_branch }} \
89-
--title "Release ${{ steps.create_release_candidate.outputs.version}} to main" \
90-
--body "This PR incorporates package(s) version and changelog update."
91-
92-
- name: Checkout to main
93-
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
94-
uses: actions/checkout@v4
95-
with:
96-
ref: ${{ env.MAIN_BRANCH }}
97-
98-
- name: Merge pull request
99-
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
100-
run: |
101-
gh pr merge ${{ github.event.inputs.target_branch }} \
102-
--delete-branch
97+
--generate-notes

0 commit comments

Comments
 (0)