From e04c75adfccca62d1603c81fd28186159da506bd Mon Sep 17 00:00:00 2001 From: Roman Bredehoft Date: Tue, 3 Oct 2023 18:20:43 +0200 Subject: [PATCH] chore: make the release action puth to the correct branch --- .github/workflows/release.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 463f9d840..944e24dc7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -245,6 +245,7 @@ jobs: IS_PATCH: ${{ needs.release-checks.outputs.is_patch }} GIT_TAG: ${{ needs.release-checks.outputs.git_tag }} RELEASE_BRANCH_NAME: ${{ needs.release-checks.outputs.release_branch_name }} + TARGET_BRANCH_NAME: ${{ github.ref }} steps: - name: Import GPG @@ -255,13 +256,15 @@ jobs: git_user_signingkey: true git_tag_gpgsign: true - # For non-rc and non-patch releases create the new release branch - - name: Create and push the release branch to public repository + # For non-rc and non-patch releases, create the new release branch + - name: Create the release branch if: env.IS_RC == 'false' && env.IS_PATCH == 'false' run: | git lfs fetch --all git checkout -b "${{ env.RELEASE_BRANCH_NAME }}" + echo "TARGET_BRANCH_NAME=${{ env.RELEASE_BRANCH_NAME }}" >> "$GITHUB_ENV" + # Create the tag related to the current version - name: Create tag run: | @@ -273,7 +276,7 @@ jobs: uses: ad-m/github-push-action@master with: github_token: ${{ secrets.BOT_TOKEN }} - branch: ${{ github.ref }} + branch: ${{ env.TARGET_BRANCH_NAME }} tags: true # This action creates docker and pypi images directly on the AWS EC2 instance