From 03293497e13c4bb94e6186e2f2fadb6f290e606b Mon Sep 17 00:00:00 2001 From: Vadim Date: Wed, 28 Jun 2023 17:24:14 +0200 Subject: [PATCH] added branch name conditions --- .github/workflows/cd_prod.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd_prod.yml b/.github/workflows/cd_prod.yml index 49795a3..1cf14bc 100644 --- a/.github/workflows/cd_prod.yml +++ b/.github/workflows/cd_prod.yml @@ -109,7 +109,7 @@ jobs: - name: Increment build number & replace version number run: perl -i -pe 's/^(version:\s+)(\d+\.\d+\.\d+)(\+)(\d+)$/$1."${{ github.event.inputs.version }}".$3.($4+1)/e' pubspec.yaml - + - name: Commit changes run: | git config --global user.name "vodemn" @@ -121,12 +121,13 @@ jobs: uses: CasperWA/push-protected@v2 with: token: ${{ secrets.PUSH_TO_MAIN_TOKEN }} - branch: main + branch: ${{ github.ref_name }} unprotect_reviews: true create-release: name: Create Github release needs: [build, update-version-in-repo] + if: ${{ github.ref_name }} == 'main' runs-on: ubuntu-latest permissions: contents: write