mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 23:40:41 +00:00
added branch name conditions
This commit is contained in:
parent
67818f7c8c
commit
03293497e1
1 changed files with 3 additions and 2 deletions
5
.github/workflows/cd_prod.yml
vendored
5
.github/workflows/cd_prod.yml
vendored
|
@ -109,7 +109,7 @@ jobs:
|
||||||
|
|
||||||
- name: Increment build number & replace version number
|
- 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
|
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
|
- name: Commit changes
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "vodemn"
|
git config --global user.name "vodemn"
|
||||||
|
@ -121,12 +121,13 @@ jobs:
|
||||||
uses: CasperWA/push-protected@v2
|
uses: CasperWA/push-protected@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.PUSH_TO_MAIN_TOKEN }}
|
token: ${{ secrets.PUSH_TO_MAIN_TOKEN }}
|
||||||
branch: main
|
branch: ${{ github.ref_name }}
|
||||||
unprotect_reviews: true
|
unprotect_reviews: true
|
||||||
|
|
||||||
create-release:
|
create-release:
|
||||||
name: Create Github release
|
name: Create Github release
|
||||||
needs: [build, update-version-in-repo]
|
needs: [build, update-version-in-repo]
|
||||||
|
if: ${{ github.ref_name }} == 'main'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
Loading…
Reference in a new issue