From 0c89affe1b633227118ba0d7b80854d1cf02719b Mon Sep 17 00:00:00 2001 From: Vadim Date: Wed, 28 Jun 2023 11:11:24 +0200 Subject: [PATCH] added push to protected branch action --- .github/workflows/cd_prod.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd_prod.yml b/.github/workflows/cd_prod.yml index f2f8ca2..039ea14 100644 --- a/.github/workflows/cd_prod.yml +++ b/.github/workflows/cd_prod.yml @@ -109,15 +109,20 @@ 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 and push changes + + - name: Commit changes run: | git config --global user.name "vodemn" git config --global user.email "vadim.turko@gmail.com" - git add -A git commit -m "Version bump" - git push + + - name: Push to main + uses: CasperWA/push-protected@v2 + with: + token: ${{ secrets.PUSH_TO_MAIN_TOKEN }} + branch: main + unprotect_reviews: true create-release: name: Create Github release