mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-23 07:50:42 +00:00
ML-61 Allow pushes from Github Action to protected branch (#85)
* Replaced zipping action thedoctor0/zip-release@0.7.1 -> vimtor/action-zip@v1.1 * typo * recursive: false * typo * typo * debugSymbolLevel 'FULL' * Update build.gradle * Version bump * wip * wip * `create-release` job * removed changelog input * added `needs` * Version bump * typo * returned to macos-11 runner * reverted pubspec version * Version bump * download artifacts * Version bump * extended artifacts path * Version bump * added LS * Version bump * Version bump * rename files * Version bump * removed ls * Version bump * revert version * typo * added push to protected branch action * run push on ubuntu-latest * added branch name conditions * Version bump * typo * Version bump
This commit is contained in:
parent
79d6034894
commit
ed83540dde
2 changed files with 11 additions and 5 deletions
14
.github/workflows/cd_prod.yml
vendored
14
.github/workflows/cd_prod.yml
vendored
|
@ -101,7 +101,7 @@ jobs:
|
|||
update-version-in-repo:
|
||||
name: Update repo version
|
||||
needs: [build]
|
||||
runs-on: macos-11
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
@ -110,18 +110,24 @@ 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: ${{ 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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: lightmeter
|
||||
description: A new Flutter project.
|
||||
publish_to: "none"
|
||||
version: 0.11.5+28
|
||||
version: 0.11.8+30
|
||||
|
||||
environment:
|
||||
sdk: ">=3.0.0 <4.0.0"
|
||||
|
|
Loading…
Reference in a new issue