mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 23:40:41 +00:00
wip
This commit is contained in:
parent
a9b75af851
commit
64cfb3cde1
1 changed files with 24 additions and 13 deletions
37
.github/workflows/cd_prod.yml
vendored
37
.github/workflows/cd_prod.yml
vendored
|
@ -7,17 +7,19 @@ name: Build prod .aab & .apk
|
|||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
paths:
|
||||
- pubspec.yaml"
|
||||
inputs:
|
||||
version:
|
||||
description: "Version"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
BUILD_ARGS: --release --flavor prod --dart-define cameraPreviewAspectRatio=2/3 -t lib/main_prod.dart
|
||||
UPDATE_VERSION_SCRIPT: perl -i -pe 's/^(version:\s+)(\d+\.\d+\.\d+)(\+)(\d+)$/$1.${{ github.event.inputs.version }}.$3.($4+1)/e' pubspec.yaml
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build .apk & .aab
|
||||
runs-on: macos-11
|
||||
timeout-minutes: 30
|
||||
|
||||
|
@ -95,14 +97,23 @@ jobs:
|
|||
name: m3_lightmeter_bundle
|
||||
path: build/app/outputs/bundle/prodRelease/app-prod-release.aab
|
||||
|
||||
create_release:
|
||||
update-version-in-repo:
|
||||
name: Update repo version
|
||||
runs-on: macos-11
|
||||
if: ${{contains(github.event.head_commit.message, 'Version bump')}}
|
||||
|
||||
steps:
|
||||
- name: Create release
|
||||
uses: ncipollo/release-action@v1
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
artifacts: "app-prod-release.apk"
|
||||
body: ${{github.event.head_commit.message}}
|
||||
makeLatest: true
|
||||
tag:
|
||||
submodules: recursive
|
||||
|
||||
- name: Increment build number & replace version number
|
||||
run: $UPDATE_VERSION_SCRIPT
|
||||
|
||||
- name: Commit and push 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
|
||||
|
|
Loading…
Reference in a new issue