From 9cde4cf093621d8a6460e94fcea400d46832aa49 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Tue, 14 May 2024 19:05:45 -0400 Subject: [PATCH] fix release branch logic --- .github/workflows/release_prep_hatch.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release_prep_hatch.yml b/.github/workflows/release_prep_hatch.yml index f4393e0a..ef5d38c3 100644 --- a/.github/workflows/release_prep_hatch.yml +++ b/.github/workflows/release_prep_hatch.yml @@ -403,7 +403,7 @@ jobs: - release-inputs if: | !failure() && !cancelled() && - needs.release-branch.outputs.name != '' && + needs.release-branch.result == 'success' && inputs.deploy-to == 'prod' steps: @@ -442,11 +442,11 @@ jobs: steps: - name: "Set release branch" id: branch + # If a release branch was created and not merged, use the release branch + # Otherwise, use the input branch because either nothing was done, or the changes were merged back in run: | - branch="" - if [ ${{ inputs.deploy-to == 'test' }} ] || [ ${{ inputs.is-nightly-release == 'true' }} ] - then - branch=${{ needs.release-branch.outputs.name }} + if [ ${{ needs.release-branch.result == 'success' }} && ${{ needs.merge-release-branch.result == 'skipped' }} ]; then + branch="${{ needs.release-branch.outputs.name }}" else branch="${{ inputs.branch }}" fi