-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into frepe/barista-hub
- Loading branch information
Showing
7 changed files
with
61 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,12 @@ inputs: | |
store_artifacts: | ||
required: false | ||
description: "Store artifact" | ||
prod_release: | ||
required: true | ||
description: "Is prod release" | ||
build_type: | ||
required: false | ||
default: "dev" | ||
options: | ||
- dev | ||
- prod | ||
|
||
runs: | ||
using: "composite" | ||
|
@@ -28,25 +31,34 @@ runs: | |
with: | ||
prod_release: ${{ inputs.prod_release }} | ||
|
||
- name: Build appbundle (dev) | ||
if: ${{ inputs.prod_release != 'true' }} | ||
- name: Build apk (dev) | ||
if: ${{ inputs.build_type == 'dev' }} | ||
run: | | ||
flutter build appbundle --flavor development --release --build-name ${{ inputs.version }} --build-number ${{ inputs.build_version }} --target lib/main_development.dart | ||
mv build/app/outputs/bundle/developmentRelease/app-development-release.aab android.aab | ||
flutter build apk --flavor development --release --build-name ${{ inputs.version }} --build-number ${{ inputs.build_version }} --target lib/main_development.dart | ||
mv build/app/outputs/flutter-apk/app-development-release.apk android.apk | ||
shell: bash | ||
|
||
- name: Upload apk (dev) | ||
if: ${{ !!inputs.store_artifacts && inputs.build_type == 'dev'}} | ||
uses: actions/[email protected] | ||
with: | ||
name: android | ||
path: android.apk | ||
retention-days: 1 | ||
if-no-files-found: error | ||
|
||
- name: Build appbundle (prod) | ||
if: ${{ inputs.prod_release == 'true' }} | ||
if: ${{ inputs.build_type == 'prod' }} | ||
run: | | ||
flutter build appbundle --flavor production --release --build-name ${{ inputs.version }} --build-number ${{ inputs.build_version }} --target lib/main_production.dart | ||
mv build/app/outputs/bundle/productionRelease/app-production-release.aab android.aab | ||
shell: bash | ||
|
||
- name: Upload Android build | ||
if: ${{ !!inputs.store_artifacts }} | ||
- name: Upload appbundle (prod) | ||
if: ${{ !!inputs.store_artifacts && inputs.build_type == 'prod'}} | ||
uses: actions/[email protected] | ||
with: | ||
name: android | ||
path: android.aab | ||
retention-days: 1 | ||
if-no-files-found: error | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
name: Build application | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
workflow_dispatch: | ||
|
||
workflow_call: | ||
|
@@ -12,16 +9,13 @@ on: | |
type: boolean | ||
required: false | ||
default: false | ||
prod_release: | ||
type: boolean | ||
required: false | ||
tag_name: | ||
type: string | ||
required: true | ||
build_type: | ||
type: string | ||
required: false | ||
|
||
env: | ||
PROD_RELEASE: ${{ inputs.prod_release || 'false' }} | ||
TAG_NAME: ${{ inputs.tag_name || 'dev' }} | ||
default: "dev" | ||
|
||
jobs: | ||
version: | ||
|
@@ -42,11 +36,11 @@ jobs: | |
echo "Version: $VERSION" | ||
echo "Run No: $BUILD_NO" | ||
env: | ||
VERSION: ${{ env.TAG_NAME }} | ||
VERSION: ${{ inputs.TAG_NAME }} | ||
BUILD_NO: ${{ steps.build_version.outputs.build_no }} | ||
|
||
outputs: | ||
version: ${{ env.TAG_NAME }} | ||
version: ${{ inputs.TAG_NAME }} | ||
build_version: ${{ steps.build_version.outputs.build_no }} | ||
|
||
build_ios: | ||
|
@@ -58,7 +52,7 @@ jobs: | |
uses: actions/[email protected] | ||
|
||
- name: Build iOS app (dev) | ||
if: ${{ env.PROD_RELEASE != 'true' }} | ||
if: ${{ inputs.build_type != 'prod' }} | ||
uses: ./.github/actions/build_ios | ||
with: | ||
version: ${{ needs.version.outputs.version }} | ||
|
@@ -68,10 +62,10 @@ jobs: | |
apple_ios_provisioning_profile: ${{ secrets.APPLE_IOS_PROVISIONING_PROFILE_DEVELOPMENT }} | ||
apple_keychain_pw: ${{ secrets.APPLE_KEYCHAIN_PW }} | ||
store_artifacts: ${{ inputs.store_artifacts }} | ||
prod_release: ${{ env.PROD_RELEASE }} | ||
build_type: ${{ inputs.build_type }} | ||
|
||
- name: Build iOS app (prod) | ||
if: ${{ env.PROD_RELEASE == 'true' }} | ||
if: ${{ inputs.build_type == 'prod' }} | ||
uses: ./.github/actions/build_ios | ||
with: | ||
version: ${{ needs.version.outputs.version }} | ||
|
@@ -81,7 +75,7 @@ jobs: | |
apple_ios_provisioning_profile: ${{ secrets.APPLE_IOS_PROVISIONING_PROFILE_PROD }} | ||
apple_keychain_pw: ${{ secrets.APPLE_KEYCHAIN_PW }} | ||
store_artifacts: ${{ inputs.store_artifacts }} | ||
prod_release: ${{ env.PROD_RELEASE }} | ||
build_type: ${{ inputs.build_type }} | ||
|
||
build_android: | ||
name: Build Android App | ||
|
@@ -97,4 +91,4 @@ jobs: | |
version: ${{ needs.version.outputs.version }} | ||
build_version: ${{ needs.version.outputs.build_version }} | ||
store_artifacts: ${{ inputs.store_artifacts }} | ||
prod_release: ${{ env.PROD_RELEASE }} | ||
build_type: ${{ inputs.build_type }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters