Skip to content

Commit

Permalink
Apply feedback from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaeus committed Sep 16, 2024
1 parent 26f289b commit d49b4af
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ jobs:
exit 1
# For non-patch releases (A.B.C where C == 0), we expect the release to
# be triggered from the A.x maintenance branch
# be triggered from the A.x maintenance branch or A.x development branch
- name: "Fail if non-patch release is created from wrong release branch"
if: ${{ endsWith(inputs.version, '.0') && env.RELEASE_BRANCH != github.ref_name && env.DEV_BRANCH != github.ref_name }}
run: |
echo '❌ Release failed due to branch mismatch: expected ${{ inputs.version }} to be released from ${{ env.RELEASE_BRANCH }} or ${{ env.DEV_BRANCH }}, got ${{ github.ref_name }}' >> $GITHUB_STEP_SUMMARY
exit 1
# If a non-patch release is created from a branch other than its
# maintenance branch, create that branch from the current one and push it
- name: "Create new and push release branch for non-patch release"
if: ${{ endsWith(inputs.version, '.0') && env.RELEASE_BRANCH != github.ref_name }}
# If a non-patch release is created from its A.x development branch,
# create the A.B maintenance branch from the current one and push it
- name: "Create and push new release branch for non-patch release"
if: ${{ endsWith(inputs.version, '.0') && env.DEV_BRANCH == github.ref_name }}
run: |
echo '🆕 Creating new release branch ${RELEASE_BRANCH} from ${{ github.ref_name }}' >> $GITHUB_STEP_SUMMARY
git checkout -b ${RELEASE_BRANCH}
Expand Down

0 comments on commit d49b4af

Please sign in to comment.