From 7d8fb2e9053df8deeb49b3ed59397c6d1216539d Mon Sep 17 00:00:00 2001 From: Ariel Demarco Date: Wed, 7 Aug 2024 18:27:47 -0300 Subject: [PATCH] Changes to understand in which branch we're --- .github/workflows/create-release.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 2373f4e6..b9b8aa4e 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -109,12 +109,25 @@ jobs: - extractor env: RC_VERSION: ${{ needs.extractor.outputs.rc_version }} + IS_PRODUCTION_READY: ${{ needs.extractor.outputs.is_production_ready }} steps: - name: Checkout Repo uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Determine base branch for the tag + if: env.IS_PRODUCTION_READY == 'true' + run: | + TAG_COMMIT=$(git rev-list -n 1 $RC_VERSION) + BASE_BRANCH=$(git branch -r --contains $TAG_COMMIT | head -n 1 | sed 's|origin/||') + echo "BASE_BRANCH=$BASE_BRANCH" >> $GITHUB_ENV + + - name: Checkout base branch + if: env.IS_PRODUCTION_READY == 'true' + run: | + git checkout $BASE_BRANCH + - name: Bump Version run: | echo "Bumping version to '$RC_VERSION'"