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'"