From dd0becd4e473f9a34fae7a011182f80a9e527e61 Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Wed, 1 Mar 2023 00:03:20 +0700 Subject: [PATCH 01/21] [#47] Add CD workflow to build & deploy Android Staging to Firebase --- .github/workflows/android_deploy_staging.yml | 58 +++++++++++++++++++ .../workflows/android_deploy_staging.yml | 50 ++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 .github/workflows/android_deploy_staging.yml create mode 100644 template/.github/workflows/android_deploy_staging.yml diff --git a/.github/workflows/android_deploy_staging.yml b/.github/workflows/android_deploy_staging.yml new file mode 100644 index 00000000..6a90b9d1 --- /dev/null +++ b/.github/workflows/android_deploy_staging.yml @@ -0,0 +1,58 @@ +name: Android - Deploy Staging build to Firebase + +on: + push: + branches: + - develop + - feature/47-setup-cd-to-build-and-deploy-android-app-to-firebase + +jobs: + build_and_deploy_android: + name: Build & Deploy Android + runs-on: ubuntu-latest + environment: staging + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Set new project + run: make run PACKAGE_NAME=co.nimblehq.flutter.template PROJECT_NAME=flutter_templates APP_NAME="Flutter Templates" + + - name: Setup Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Setup Flutter environment + uses: subosito/flutter-action@v2 + with: + channel: 'stable' + flutter-version: '3.3.10' + + - name: Get flutter dependencies + run: flutter pub get + + - name: Run code generator. + run: flutter packages pub run build_runner build --delete-conflicting-outputs + + - name: Setup .env.staging + env: + ENV_STAGING: ${{ secrets.ENV_STAGING }} + run: | + echo $ENV_STAGING > .env.staging + + # App Bundle requires Firebase connected to Play Store to upload https://appdistribution.page.link/KPoa + - name: Build Android apk + run: flutter build apk --flavor staging --debug --build-number $GITHUB_RUN_NUMBER + + - name: Upload Android Staging to Firebase + uses: wzieba/Firebase-Distribution-Github-Action@v1.3.3 + with: + appId: ${{secrets.FIREBASE_ANDROID_APP_ID_STAGING}} + token: ${{secrets.FIREBASE_TOKEN}} + groups: dev + file: build/app/outputs/flutter-apk/app-staging-debug.apk diff --git a/template/.github/workflows/android_deploy_staging.yml b/template/.github/workflows/android_deploy_staging.yml new file mode 100644 index 00000000..169015a3 --- /dev/null +++ b/template/.github/workflows/android_deploy_staging.yml @@ -0,0 +1,50 @@ +name: Android - Deploy Staging build to Firebase + +on: + push: + branches: + - develop + +jobs: + build_and_deploy_android: + name: Build & Deploy Android + runs-on: ubuntu-latest + environment: staging + steps: + - uses: actions/checkout@v3 + + - name: Setup Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Setup Flutter environment + uses: subosito/flutter-action@v2 + with: + channel: 'stable' + flutter-version: '3.3.10' + + - name: Get flutter dependencies + run: flutter pub get + + - name: Run code generator. + run: flutter packages pub run build_runner build --delete-conflicting-outputs + + - name: Setup .env.staging + env: + ENV_STAGING: ${{ secrets.ENV_STAGING }} + run: | + echo $ENV_STAGING > .env.staging + + # App Bundle requires Firebase connected to Play Store to upload https://appdistribution.page.link/KPoa + - name: Build Android apk + run: flutter build apk --flavor staging --debug --build-number $GITHUB_RUN_NUMBER + + - name: Upload Android Staging to Firebase + uses: wzieba/Firebase-Distribution-Github-Action@v1.3.3 + with: + appId: ${{secrets.FIREBASE_ANDROID_APP_ID_STAGING}} + token: ${{secrets.FIREBASE_TOKEN}} + groups: dev + file: build/app/outputs/flutter-apk/app-staging-debug.apk From f7cbfc1fde7be51ed4c4838128fa5a14a6bce42d Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Wed, 1 Mar 2023 00:31:25 +0700 Subject: [PATCH 02/21] [#47] Migrate to use service account to deploy build to Firebase --- .github/workflows/android_deploy_staging.yml | 8 ++++---- template/.github/workflows/android_deploy_staging.yml | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/android_deploy_staging.yml b/.github/workflows/android_deploy_staging.yml index 6a90b9d1..cde13c2f 100644 --- a/.github/workflows/android_deploy_staging.yml +++ b/.github/workflows/android_deploy_staging.yml @@ -49,10 +49,10 @@ jobs: - name: Build Android apk run: flutter build apk --flavor staging --debug --build-number $GITHUB_RUN_NUMBER - - name: Upload Android Staging to Firebase - uses: wzieba/Firebase-Distribution-Github-Action@v1.3.3 + - name: Deploy Android Staging to Firebase + uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0 with: appId: ${{secrets.FIREBASE_ANDROID_APP_ID_STAGING}} - token: ${{secrets.FIREBASE_TOKEN}} - groups: dev + serviceCredentialsFileContent: ${{secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON}} + groups: nimble file: build/app/outputs/flutter-apk/app-staging-debug.apk diff --git a/template/.github/workflows/android_deploy_staging.yml b/template/.github/workflows/android_deploy_staging.yml index 169015a3..a4e5c120 100644 --- a/template/.github/workflows/android_deploy_staging.yml +++ b/template/.github/workflows/android_deploy_staging.yml @@ -9,7 +9,6 @@ jobs: build_and_deploy_android: name: Build & Deploy Android runs-on: ubuntu-latest - environment: staging steps: - uses: actions/checkout@v3 @@ -41,10 +40,10 @@ jobs: - name: Build Android apk run: flutter build apk --flavor staging --debug --build-number $GITHUB_RUN_NUMBER - - name: Upload Android Staging to Firebase - uses: wzieba/Firebase-Distribution-Github-Action@v1.3.3 + - name: Deploy Android Staging to Firebase + uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0 with: appId: ${{secrets.FIREBASE_ANDROID_APP_ID_STAGING}} - token: ${{secrets.FIREBASE_TOKEN}} - groups: dev + serviceCredentialsFileContent: ${{secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON}} + groups: nimble file: build/app/outputs/flutter-apk/app-staging-debug.apk From d38cd63029cb7e7b86dd4d286bf942c565eae6e5 Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Wed, 1 Mar 2023 01:08:57 +0700 Subject: [PATCH 03/21] [#47] Add CD workflow to build & deploy Android Production to Firebase --- .../workflows/android_deploy_production.yml | 57 +++++++++++++++++++ .../workflows/android_deploy_production.yml | 49 ++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 .github/workflows/android_deploy_production.yml create mode 100644 template/.github/workflows/android_deploy_production.yml diff --git a/.github/workflows/android_deploy_production.yml b/.github/workflows/android_deploy_production.yml new file mode 100644 index 00000000..99cceadf --- /dev/null +++ b/.github/workflows/android_deploy_production.yml @@ -0,0 +1,57 @@ +name: Android - Deploy Production build to Firebase + +on: + push: + branches: + - main + - feature/47-setup-cd-to-build-and-deploy-android-app-to-firebase + +jobs: + build_and_deploy_android: + name: Build & Deploy Android + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Set new project + run: make run PACKAGE_NAME=co.nimblehq.flutter.template PROJECT_NAME=flutter_templates APP_NAME="Flutter Templates" + + - name: Setup Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Setup Flutter environment + uses: subosito/flutter-action@v2 + with: + channel: 'stable' + flutter-version: '3.3.10' + + - name: Get flutter dependencies + run: flutter pub get + + - name: Run code generator. + run: flutter packages pub run build_runner build --delete-conflicting-outputs + + - name: Setup .env + env: + ENV_PRODUCTION: ${{ secrets.ENV_PRODUCTION }} + run: | + echo $ENV_PRODUCTION > .env + + # App Bundle requires Firebase connected to Play Store to upload https://appdistribution.page.link/KPoa + - name: Build Android apk + run: flutter build apk --flavor production --debug --build-number $GITHUB_RUN_NUMBER + + - name: Deploy Android Production to Firebase + uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0 + with: + appId: ${{secrets.FIREBASE_ANDROID_APP_ID_PRODUCTION}} + serviceCredentialsFileContent: ${{secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON}} + groups: nimble + file: build/app/outputs/flutter-apk/app-production-debug.apk diff --git a/template/.github/workflows/android_deploy_production.yml b/template/.github/workflows/android_deploy_production.yml new file mode 100644 index 00000000..b8d4fc1a --- /dev/null +++ b/template/.github/workflows/android_deploy_production.yml @@ -0,0 +1,49 @@ +name: Android - Deploy Production build to Firebase + +on: + push: + branches: + - main + +jobs: + build_and_deploy_android: + name: Build & Deploy Android + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Setup Flutter environment + uses: subosito/flutter-action@v2 + with: + channel: 'stable' + flutter-version: '3.3.10' + + - name: Get flutter dependencies + run: flutter pub get + + - name: Run code generator. + run: flutter packages pub run build_runner build --delete-conflicting-outputs + + - name: Setup .env + env: + ENV_PRODUCTION: ${{ secrets.ENV_PRODUCTION }} + run: | + echo $ENV_PRODUCTION > .env + + # App Bundle requires Firebase connected to Play Store to upload https://appdistribution.page.link/KPoa + - name: Build Android apk + run: flutter build apk --flavor production --debug --build-number $GITHUB_RUN_NUMBER + + - name: Deploy Android Production to Firebase + uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0 + with: + appId: ${{secrets.FIREBASE_ANDROID_APP_ID_PRODUCTION}} + serviceCredentialsFileContent: ${{secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON}} + groups: nimble + file: build/app/outputs/flutter-apk/app-production-debug.apk From 287dce735c88b49a59603737a1260eef2382a82e Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Wed, 1 Mar 2023 01:26:59 +0700 Subject: [PATCH 04/21] [#47] Remove test branch trigger --- .github/workflows/android_deploy_production.yml | 1 - .github/workflows/android_deploy_staging.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/android_deploy_production.yml b/.github/workflows/android_deploy_production.yml index 99cceadf..611e25d0 100644 --- a/.github/workflows/android_deploy_production.yml +++ b/.github/workflows/android_deploy_production.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - feature/47-setup-cd-to-build-and-deploy-android-app-to-firebase jobs: build_and_deploy_android: diff --git a/.github/workflows/android_deploy_staging.yml b/.github/workflows/android_deploy_staging.yml index cde13c2f..64f0b50f 100644 --- a/.github/workflows/android_deploy_staging.yml +++ b/.github/workflows/android_deploy_staging.yml @@ -4,7 +4,6 @@ on: push: branches: - develop - - feature/47-setup-cd-to-build-and-deploy-android-app-to-firebase jobs: build_and_deploy_android: From 4db1de7a22f6777980d5f7be61e8b2472f32904e Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Wed, 1 Mar 2023 01:29:00 +0700 Subject: [PATCH 05/21] [#47] Refactor: Add missing names to some Action steps in existing workflows --- .github/workflows/android_deploy_production.yml | 5 +++-- .github/workflows/android_deploy_staging.yml | 5 +++-- .github/workflows/bump_version.yml | 2 ++ .github/workflows/test.yml | 10 ++++++---- template/.github/workflows/ios_deploy_to_app_store.yml | 5 +++-- .../.github/workflows/ios_deploy_to_testflight.yml | 5 +++-- template/.github/workflows/test.yml | 10 +++++----- 7 files changed, 25 insertions(+), 17 deletions(-) diff --git a/.github/workflows/android_deploy_production.yml b/.github/workflows/android_deploy_production.yml index 611e25d0..558125eb 100644 --- a/.github/workflows/android_deploy_production.yml +++ b/.github/workflows/android_deploy_production.yml @@ -12,11 +12,12 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v2 + - name: Setup Python + uses: actions/setup-python@v2 with: python-version: '3.9' - - name: Set new project + - name: Generate new project run: make run PACKAGE_NAME=co.nimblehq.flutter.template PROJECT_NAME=flutter_templates APP_NAME="Flutter Templates" - name: Setup Java JDK diff --git a/.github/workflows/android_deploy_staging.yml b/.github/workflows/android_deploy_staging.yml index 64f0b50f..336d70da 100644 --- a/.github/workflows/android_deploy_staging.yml +++ b/.github/workflows/android_deploy_staging.yml @@ -13,11 +13,12 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v2 + - name: Setup Python + uses: actions/setup-python@v2 with: python-version: '3.9' - - name: Set new project + - name: Generate new project run: make run PACKAGE_NAME=co.nimblehq.flutter.template PROJECT_NAME=flutter_templates APP_NAME="Flutter Templates" - name: Setup Java JDK diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml index 8daac97c..dcc2fc44 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/bump_version.yml @@ -17,10 +17,12 @@ jobs: uses: actions/checkout@v2 with: token: ${{ secrets.GITHUB_TOKEN }} + - name: Set new version id: set_version run: | perl -i -pe 's/^(version:\s+\d+\.\d+\.\d+\+)(\d+)$/"version: ${{ github.event.inputs.newVersion }}+".($2+1)/e' ./template/pubspec.yaml + - name: Create Pull Request uses: peter-evans/create-pull-request@v4 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 56c63b49..24ebb680 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,16 +17,18 @@ jobs: steps: - uses: actions/checkout@v2.3.2 - - uses: actions/setup-python@v2 + - name: Setup Python + uses: actions/setup-python@v2 with: python-version: '3.9' - - name: Set new project + - name: Generate new project run: make run PACKAGE_NAME=co.nimblehq.flutter.template PROJECT_NAME=flutter_templates APP_NAME="Flutter Templates" - - uses: subosito/flutter-action@v1 + - name: Setup Flutter environment + uses: subosito/flutter-action@v2 with: - channel: 'stable' # 'dev', 'alpha', default to: 'stable' + channel: 'stable' flutter-version: '3.3.10' - name: Get flutter dependencies. diff --git a/template/.github/workflows/ios_deploy_to_app_store.yml b/template/.github/workflows/ios_deploy_to_app_store.yml index f7eb19e6..c16f847f 100644 --- a/template/.github/workflows/ios_deploy_to_app_store.yml +++ b/template/.github/workflows/ios_deploy_to_app_store.yml @@ -28,10 +28,11 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - uses: subosito/flutter-action@v1 + - name: Setup Flutter environment + uses: subosito/flutter-action@v2 with: channel: 'stable' - flutter-version: '2.10.3' + flutter-version: '3.3.10' - name: Get flutter dependencies run: flutter pub get diff --git a/template/.github/workflows/ios_deploy_to_testflight.yml b/template/.github/workflows/ios_deploy_to_testflight.yml index d81777e5..15e2d985 100644 --- a/template/.github/workflows/ios_deploy_to_testflight.yml +++ b/template/.github/workflows/ios_deploy_to_testflight.yml @@ -25,10 +25,11 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - uses: subosito/flutter-action@v1 + - name: Setup Flutter environment + uses: subosito/flutter-action@v2 with: channel: 'stable' - flutter-version: '2.10.3' + flutter-version: '3.3.10' - name: Get flutter dependencies run: flutter pub get diff --git a/template/.github/workflows/test.yml b/template/.github/workflows/test.yml index 05abca60..bd27098d 100644 --- a/template/.github/workflows/test.yml +++ b/template/.github/workflows/test.yml @@ -16,10 +16,10 @@ jobs: steps: - uses: actions/checkout@v2.3.2 - # Setup the flutter environment. - - uses: subosito/flutter-action@v1 + - name: Setup Flutter environment + uses: subosito/flutter-action@v2 with: - channel: 'stable' # 'dev', 'alpha', default to: 'stable' + channel: 'stable' flutter-version: '3.3.10' - name: Get flutter dependencies. @@ -37,9 +37,9 @@ jobs: - name: Run widget tests, unit tests. run: flutter test --machine --coverage - - uses: codecov/codecov-action@v2 + - name: Upload coverage to codecov + uses: codecov/codecov-action@v2 with: - name: Upload coverage to codecov files: ./coverage/lcov.info flags: unittests # optional token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos From 11c7647efd9a41658897f71cdb551af1ac1f16a4 Mon Sep 17 00:00:00 2001 From: luongvo Date: Wed, 1 Mar 2023 09:03:16 +0000 Subject: [PATCH 06/21] Bump version to 1.6.0 --- template/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/pubspec.yaml b/template/pubspec.yaml index 5fe23019..34059b4e 100644 --- a/template/pubspec.yaml +++ b/template/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.5.0+15 +version: 1.6.0+16 environment: sdk: ">=2.17.5 <3.0.0" From d76b6f47863a9cc64994c6c49e454a0b98e1cd1c Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Wed, 1 Mar 2023 16:05:49 +0700 Subject: [PATCH 07/21] [Chore] Add more code reviewers --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 986d168d..d61d2d31 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,6 +1,6 @@ # Team # @luongvo is the Team Lead -* @manh-t @doannimble @luongvo @markgravity +* @manh-t @doannimble @luongvo @markgravity @sleepylee @chornerman # Engineering Leads CODEOWNERS @nimblehq/engineering-leads From eea576197ffe8a7ffd765441d45ea53644d90da0 Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Mon, 6 Mar 2023 17:05:54 +0700 Subject: [PATCH 08/21] [#47] Add space into "${{ ... }}" to consistent with the others --- .github/workflows/android_deploy_production.yml | 4 ++-- .github/workflows/android_deploy_staging.yml | 4 ++-- template/.github/workflows/android_deploy_production.yml | 4 ++-- template/.github/workflows/android_deploy_staging.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/android_deploy_production.yml b/.github/workflows/android_deploy_production.yml index 558125eb..297e95a4 100644 --- a/.github/workflows/android_deploy_production.yml +++ b/.github/workflows/android_deploy_production.yml @@ -51,7 +51,7 @@ jobs: - name: Deploy Android Production to Firebase uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0 with: - appId: ${{secrets.FIREBASE_ANDROID_APP_ID_PRODUCTION}} - serviceCredentialsFileContent: ${{secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON}} + appId: ${{ secrets.FIREBASE_ANDROID_APP_ID_PRODUCTION }} + serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }} groups: nimble file: build/app/outputs/flutter-apk/app-production-debug.apk diff --git a/.github/workflows/android_deploy_staging.yml b/.github/workflows/android_deploy_staging.yml index 336d70da..54cdc2e4 100644 --- a/.github/workflows/android_deploy_staging.yml +++ b/.github/workflows/android_deploy_staging.yml @@ -52,7 +52,7 @@ jobs: - name: Deploy Android Staging to Firebase uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0 with: - appId: ${{secrets.FIREBASE_ANDROID_APP_ID_STAGING}} - serviceCredentialsFileContent: ${{secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON}} + appId: ${{ secrets.FIREBASE_ANDROID_APP_ID_STAGING }} + serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }} groups: nimble file: build/app/outputs/flutter-apk/app-staging-debug.apk diff --git a/template/.github/workflows/android_deploy_production.yml b/template/.github/workflows/android_deploy_production.yml index b8d4fc1a..95276223 100644 --- a/template/.github/workflows/android_deploy_production.yml +++ b/template/.github/workflows/android_deploy_production.yml @@ -43,7 +43,7 @@ jobs: - name: Deploy Android Production to Firebase uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0 with: - appId: ${{secrets.FIREBASE_ANDROID_APP_ID_PRODUCTION}} - serviceCredentialsFileContent: ${{secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON}} + appId: ${{ secrets.FIREBASE_ANDROID_APP_ID_PRODUCTION }} + serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }} groups: nimble file: build/app/outputs/flutter-apk/app-production-debug.apk diff --git a/template/.github/workflows/android_deploy_staging.yml b/template/.github/workflows/android_deploy_staging.yml index a4e5c120..1dcb514d 100644 --- a/template/.github/workflows/android_deploy_staging.yml +++ b/template/.github/workflows/android_deploy_staging.yml @@ -43,7 +43,7 @@ jobs: - name: Deploy Android Staging to Firebase uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0 with: - appId: ${{secrets.FIREBASE_ANDROID_APP_ID_STAGING}} - serviceCredentialsFileContent: ${{secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON}} + appId: ${{ secrets.FIREBASE_ANDROID_APP_ID_STAGING }} + serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }} groups: nimble file: build/app/outputs/flutter-apk/app-staging-debug.apk From fa799ade7b7ccfa4784c588b60f0cf3ab2a6a43c Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Thu, 9 Mar 2023 16:59:52 +0700 Subject: [PATCH 09/21] [#172] Rename repository name to "flutter-templates" --- .github/ISSUE_TEMPLATE/config.yml | 4 ++-- .github/PULL_REQUEST_TEMPLATE/release_template.md | 2 +- README.md | 4 ++-- template/.github/PULL_REQUEST_TEMPLATE.md | 2 +- template/.github/PULL_REQUEST_TEMPLATE/release_template.md | 4 ++-- template/README.md | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index b5ce5b10..50d21b20 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -4,8 +4,8 @@ contact_links: - name: Request For Comments (RFC) about: When having an idea on how to improve our processes, propose the idea so that the team can provide feedback. # URL to create an RFC with the template - url: https://github.com/nimblehq/flutter_templates/discussions/new?category=rfcs&title=+&body=%23%23+Issue%0D%0A%0D%0ADescribe+the+issue+the+team+is+currently+facing.+Provide+as+much+content+as+possible.%0D%0A%0D%0A%23%23+Solution%0D%0A%0D%0ADescribe+the+solution+you+are+prescribing+for+the+issue%0D%0A%0D%0A%23%23+Who+Benefits%3F%0D%0A%0D%0ADescribe+who+will+be+the+beneficiaries+e.g.+everyone,+specific+chapters,+clients...%0D%0A%0D%0A%23%23+What%27s+Next%3F%0D%0A%0D%0AProvide+an+actionable+list+of+things+that+must+happen+in+order+to+implement+the+solution:%0D%0A%0D%0A-+[+]%0D%0A-+[+]%0D%0A-+[+] + url: https://github.com/nimblehq/flutter-templates/discussions/new?category=rfcs&title=+&body=%23%23+Issue%0D%0A%0D%0ADescribe+the+issue+the+team+is+currently+facing.+Provide+as+much+content+as+possible.%0D%0A%0D%0A%23%23+Solution%0D%0A%0D%0ADescribe+the+solution+you+are+prescribing+for+the+issue%0D%0A%0D%0A%23%23+Who+Benefits%3F%0D%0A%0D%0ADescribe+who+will+be+the+beneficiaries+e.g.+everyone,+specific+chapters,+clients...%0D%0A%0D%0A%23%23+What%27s+Next%3F%0D%0A%0D%0AProvide+an+actionable+list+of+things+that+must+happen+in+order+to+implement+the+solution:%0D%0A%0D%0A-+[+]%0D%0A-+[+]%0D%0A-+[+] - name: Ask a question about: When having a question about a pull request, issue, or problem, create a Q&A discussion to get help from the team. - url: https://github.com/nimblehq/flutter_templates/discussions/new?category=q-a + url: https://github.com/nimblehq/flutter-templates/discussions/new?category=q-a diff --git a/.github/PULL_REQUEST_TEMPLATE/release_template.md b/.github/PULL_REQUEST_TEMPLATE/release_template.md index 1f5e5ad6..ab98813a 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/release_template.md @@ -1,4 +1,4 @@ -https://github.com/nimblehq/flutter_templates/milestone/? +https://github.com/nimblehq/flutter-templates/milestone/? ## Features diff --git a/README.md b/README.md index ba08e5b7..1e6a670f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ All the templates that can be used to kick off a new Flutter application quickly Clone the repository -`git clone git@github.com:nimblehq/flutter_templates.git` +`git clone git@github.com:nimblehq/flutter-templates.git` ## Use the template @@ -28,7 +28,7 @@ Clone the repository | PROJECT_NAME | Yes | The application project name. The naming convention follows `your_project_name` | | APP_NAME | Yes | The application name. | - More available configs [here](https://github.com/nimblehq/flutter_templates/wiki/Generating-A-Project) + More available configs [here](https://github.com/nimblehq/flutter-templates/wiki/Generating-A-Project) - For more supporting commands, run: diff --git a/template/.github/PULL_REQUEST_TEMPLATE.md b/template/.github/PULL_REQUEST_TEMPLATE.md index bf553ce5..51e16e14 100644 --- a/template/.github/PULL_REQUEST_TEMPLATE.md +++ b/template/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ -https://github.com/nimblehq/flutter_templates/issues/?? +https://github.com/nimblehq/flutter-templates/issues/?? ## What happened 👀 diff --git a/template/.github/PULL_REQUEST_TEMPLATE/release_template.md b/template/.github/PULL_REQUEST_TEMPLATE/release_template.md index 81bfc7c9..12cc271f 100644 --- a/template/.github/PULL_REQUEST_TEMPLATE/release_template.md +++ b/template/.github/PULL_REQUEST_TEMPLATE/release_template.md @@ -1,4 +1,4 @@ -Link to the milestone on Github e.g. https://github.com/nimblehq/flutter_templates/milestone/41?closed=1 +Link to the milestone on Github e.g. https://github.com/nimblehq/flutter-templates/milestone/41?closed=1 or Link to the project management tool for the release ## Features @@ -6,7 +6,7 @@ or Link to the project management tool for the release Provide the ID and title of the issue in the section for each type (feature, chore and bug). The link is optional. - [#1] As a user, I can log in or -- [[#1](https://github.com/nimblehq/flutter_templates/issues/1)] As a user, I can log in +- [[#1](https://github.com/nimblehq/flutter-templates/issues/1)] As a user, I can log in ## Chores - Same structure as in ## Feature diff --git a/template/README.md b/template/README.md index 2bf05b6f..abfbdf4d 100644 --- a/template/README.md +++ b/template/README.md @@ -1,6 +1,6 @@ # Flutter Templates -[![codecov](https://codecov.io/gh/nimblehq/flutter_templates/branch/main/graph/badge.svg?token=ATUNXDX218)](https://codecov.io/gh/nimblehq/flutter_templates) +[![codecov](https://codecov.io/gh/nimblehq/flutter-templates/branch/main/graph/badge.svg?token=ATUNXDX218)](https://codecov.io/gh/nimblehq/flutter-templates) All the templates that can be used to kick off a new Flutter application quickly. @@ -8,7 +8,7 @@ All the templates that can be used to kick off a new Flutter application quickly Clone the repository -`git clone git@github.com:nimblehq/flutter_templates.git` +`git clone git@github.com:nimblehq/flutter-templates.git` ## Prerequisite From 2013e009ecd6b6c11efbfb31a6d2e63d542a6161 Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Thu, 9 Mar 2023 17:21:14 +0700 Subject: [PATCH 10/21] [#172] Add wiki link in the root README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1e6a670f..880a0ac3 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ Clone the repository `git clone git@github.com:nimblehq/flutter-templates.git` +## Documentation + +Checkout the [Wiki](https://github.com/nimblehq/flutter-templates/wiki) page to access the full documentation. + ## Use the template ### Setup a new project From 008f0f3603d5bade420f07bf6898741774ded306 Mon Sep 17 00:00:00 2001 From: Chorn Date: Tue, 7 Mar 2023 15:51:21 +0700 Subject: [PATCH 11/21] [#140] Add version bumping workflow to generated project --- .github/workflows/bump_version.yml | 10 ++--- template/.github/workflows/bump_version.yml | 49 +++++++++++++++++++++ 2 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 template/.github/workflows/bump_version.yml diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml index dcc2fc44..5ea2fb77 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/bump_version.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the latest code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -23,7 +23,7 @@ jobs: run: | perl -i -pe 's/^(version:\s+\d+\.\d+\.\d+\+)(\d+)$/"version: ${{ github.event.inputs.newVersion }}+".($2+1)/e' ./template/pubspec.yaml - - name: Create Pull Request + - name: Create pull request uses: peter-evans/create-pull-request@v4 with: assignees: ${{ secrets.GITHUB_USER }} @@ -36,14 +36,14 @@ jobs: labels: | type : chore body: | - ## What happened + ## What happened 👀 Bump version to ${{ github.event.inputs.newVersion }} - ## Insight + ## Insight 📝 Automatically created by the Bump Version workflow. - ## Proof Of Work + ## Proof Of Work 📹 On the Files changed tab diff --git a/template/.github/workflows/bump_version.yml b/template/.github/workflows/bump_version.yml new file mode 100644 index 00000000..5ea2fb77 --- /dev/null +++ b/template/.github/workflows/bump_version.yml @@ -0,0 +1,49 @@ +name: Bump Version + +on: + workflow_dispatch: + inputs: + newVersion: + description: "New version" + required: true + type: string + +jobs: + bump_version: + name: Bump version + runs-on: ubuntu-latest + steps: + - name: Checkout the latest code + uses: actions/checkout@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Set new version + id: set_version + run: | + perl -i -pe 's/^(version:\s+\d+\.\d+\.\d+\+)(\d+)$/"version: ${{ github.event.inputs.newVersion }}+".($2+1)/e' ./template/pubspec.yaml + + - name: Create pull request + uses: peter-evans/create-pull-request@v4 + with: + assignees: ${{ secrets.GITHUB_USER }} + token: ${{ secrets.WIKI_ACTION_TOKEN }} + commit-message: Bump version to ${{ github.event.inputs.newVersion }} + committer: Nimble Bot + branch: chore/bump-version-to-${{ github.event.inputs.newVersion }} + delete-branch: true + title: '[Chore] Bump version to ${{ github.event.inputs.newVersion }}' + labels: | + type : chore + body: | + ## What happened 👀 + + Bump version to ${{ github.event.inputs.newVersion }} + + ## Insight 📝 + + Automatically created by the Bump Version workflow. + + ## Proof Of Work 📹 + + On the Files changed tab From 09af5afaecad161ef3a1ab0deacc2cf24093ed29 Mon Sep 17 00:00:00 2001 From: Chorn Date: Thu, 9 Mar 2023 18:03:45 +0700 Subject: [PATCH 12/21] [#140] Fix pubspec.yaml path --- template/.github/workflows/bump_version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/.github/workflows/bump_version.yml b/template/.github/workflows/bump_version.yml index 5ea2fb77..737d76ee 100644 --- a/template/.github/workflows/bump_version.yml +++ b/template/.github/workflows/bump_version.yml @@ -21,7 +21,7 @@ jobs: - name: Set new version id: set_version run: | - perl -i -pe 's/^(version:\s+\d+\.\d+\.\d+\+)(\d+)$/"version: ${{ github.event.inputs.newVersion }}+".($2+1)/e' ./template/pubspec.yaml + perl -i -pe 's/^(version:\s+\d+\.\d+\.\d+\+)(\d+)$/"version: ${{ github.event.inputs.newVersion }}+".($2+1)/e' ./pubspec.yaml - name: Create pull request uses: peter-evans/create-pull-request@v4 From e9873d8b7b03a65120f36081bd22c8fa6788b3c9 Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Wed, 1 Mar 2023 14:20:58 +0700 Subject: [PATCH 13/21] [#61] Add CD workflow to build & deploy Android Production release app bundle to Play Store --- ...android_deploy_production_to_playstore.yml | 59 +++++++++++++++++++ ...android_deploy_production_to_playstore.yml | 50 ++++++++++++++++ .../.github/workflows/whatsnew/whatsnew-en-US | 3 + 3 files changed, 112 insertions(+) create mode 100644 .github/workflows/android_deploy_production_to_playstore.yml create mode 100644 template/.github/workflows/android_deploy_production_to_playstore.yml create mode 100644 template/.github/workflows/whatsnew/whatsnew-en-US diff --git a/.github/workflows/android_deploy_production_to_playstore.yml b/.github/workflows/android_deploy_production_to_playstore.yml new file mode 100644 index 00000000..6be7ed6e --- /dev/null +++ b/.github/workflows/android_deploy_production_to_playstore.yml @@ -0,0 +1,59 @@ +name: Android - Deploy Production build to Play Store + +on: + push: + branches: + - main + - feature/61-setup-cd-to-build-and-deploy-android-app-to-playstore + +jobs: + build_and_deploy_android: + name: Build & Deploy Android + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Generate new project + run: make run PACKAGE_NAME=co.nimblehq.flutter.template PROJECT_NAME=flutter_templates APP_NAME="Flutter Templates" + + - name: Setup Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Setup Flutter environment + uses: subosito/flutter-action@v2 + with: + channel: 'stable' + flutter-version: '3.3.10' + + - name: Get flutter dependencies + run: flutter pub get + + - name: Run code generator. + run: flutter packages pub run build_runner build --delete-conflicting-outputs + + - name: Setup .env + env: + ENV_PRODUCTION: ${{ secrets.ENV_PRODUCTION }} + run: | + echo $ENV_PRODUCTION > .env + + - name: Build Production App Bundle + run: flutter build appbundle --flavor production --release --build-number $GITHUB_RUN_NUMBER + + - name: Upload Android Production Release bundle to Play Store + uses: r0adkll/upload-google-play@v1 + with: + serviceAccountJson: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }} + packageName: co.nimblehq.flutter.template + releaseFile: build/app/outputs/bundle/productionRelease/app-production-release.aab + track: internal + userFraction: 0.0 + whatsNewDirectory: .github/workflows/whatsnew diff --git a/template/.github/workflows/android_deploy_production_to_playstore.yml b/template/.github/workflows/android_deploy_production_to_playstore.yml new file mode 100644 index 00000000..8623bd14 --- /dev/null +++ b/template/.github/workflows/android_deploy_production_to_playstore.yml @@ -0,0 +1,50 @@ +name: Android - Deploy Production build to Play Store + +on: + push: + branches: + - main + +jobs: + build_and_deploy_android: + name: Build & Deploy Android + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Setup Flutter environment + uses: subosito/flutter-action@v2 + with: + channel: 'stable' + flutter-version: '3.3.10' + + - name: Get flutter dependencies + run: flutter pub get + + - name: Run code generator. + run: flutter packages pub run build_runner build --delete-conflicting-outputs + + - name: Setup .env + env: + ENV_PRODUCTION: ${{ secrets.ENV_PRODUCTION }} + run: | + echo $ENV_PRODUCTION > .env + + - name: Build Production App Bundle + run: flutter build appbundle --flavor production --release --build-number $GITHUB_RUN_NUMBER + + - name: Upload Android Production Release bundle to Play Store + uses: r0adkll/upload-google-play@v1 + with: + serviceAccountJson: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }} + packageName: co.nimblehq.flutter.template + releaseFile: build/app/outputs/bundle/productionRelease/app-production-release.aab + track: internal + userFraction: 0.0 + whatsNewDirectory: .github/workflows/whatsnew diff --git a/template/.github/workflows/whatsnew/whatsnew-en-US b/template/.github/workflows/whatsnew/whatsnew-en-US new file mode 100644 index 00000000..6230febe --- /dev/null +++ b/template/.github/workflows/whatsnew/whatsnew-en-US @@ -0,0 +1,3 @@ + +Enter or paste your release notes for en-US here + From 8c7cc9bdc9e4d600d98090ba14cfbb652ff47829 Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Tue, 7 Mar 2023 13:53:27 +0700 Subject: [PATCH 14/21] [#61] Fix: 'userFraction' must be between 0 and 1! Got 0 --- .github/workflows/android_deploy_production_to_playstore.yml | 2 +- .../workflows/android_deploy_production_to_playstore.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android_deploy_production_to_playstore.yml b/.github/workflows/android_deploy_production_to_playstore.yml index 6be7ed6e..9aeb728e 100644 --- a/.github/workflows/android_deploy_production_to_playstore.yml +++ b/.github/workflows/android_deploy_production_to_playstore.yml @@ -55,5 +55,5 @@ jobs: packageName: co.nimblehq.flutter.template releaseFile: build/app/outputs/bundle/productionRelease/app-production-release.aab track: internal - userFraction: 0.0 + userFraction: 1.0 whatsNewDirectory: .github/workflows/whatsnew diff --git a/template/.github/workflows/android_deploy_production_to_playstore.yml b/template/.github/workflows/android_deploy_production_to_playstore.yml index 8623bd14..7c261c21 100644 --- a/template/.github/workflows/android_deploy_production_to_playstore.yml +++ b/template/.github/workflows/android_deploy_production_to_playstore.yml @@ -46,5 +46,5 @@ jobs: packageName: co.nimblehq.flutter.template releaseFile: build/app/outputs/bundle/productionRelease/app-production-release.aab track: internal - userFraction: 0.0 + userFraction: 1.0 whatsNewDirectory: .github/workflows/whatsnew From 5d927b06903155cbfe6238e7c1987192c3325916 Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Tue, 7 Mar 2023 13:55:55 +0700 Subject: [PATCH 15/21] [#61] Disable Upload bundle to Play Store step while waiting for a shared Service Account for Play Store publishing --- ...android_deploy_production_to_playstore.yml | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/android_deploy_production_to_playstore.yml b/.github/workflows/android_deploy_production_to_playstore.yml index 9aeb728e..3e638d4a 100644 --- a/.github/workflows/android_deploy_production_to_playstore.yml +++ b/.github/workflows/android_deploy_production_to_playstore.yml @@ -48,12 +48,14 @@ jobs: - name: Build Production App Bundle run: flutter build appbundle --flavor production --release --build-number $GITHUB_RUN_NUMBER - - name: Upload Android Production Release bundle to Play Store - uses: r0adkll/upload-google-play@v1 - with: - serviceAccountJson: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }} - packageName: co.nimblehq.flutter.template - releaseFile: build/app/outputs/bundle/productionRelease/app-production-release.aab - track: internal - userFraction: 1.0 - whatsNewDirectory: .github/workflows/whatsnew + # TODO We will enable this step later when having a shared Service Account on our organization + # Basically, this step will work properly after providing a valid Service Account. + # - name: Upload Android Production Release bundle to Play Store + # uses: r0adkll/upload-google-play@v1 + # with: + # serviceAccountJson: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }} + # packageName: co.nimblehq.flutter.template + # releaseFile: build/app/outputs/bundle/productionRelease/app-production-release.aab + # track: internal + # userFraction: 1.0 + # whatsNewDirectory: .github/workflows/whatsnew From 1eeb28eb2a2e38e85c2011c8e3cf5ebe69cb2e5a Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Tue, 7 Mar 2023 14:26:14 +0700 Subject: [PATCH 16/21] [#61] Add Android app publishing wiki --- .github/wiki/Deployment.md | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/wiki/Deployment.md b/.github/wiki/Deployment.md index 7465ba72..e34bcbd0 100644 --- a/.github/wiki/Deployment.md +++ b/.github/wiki/Deployment.md @@ -1,19 +1,37 @@ # Deployment Process +## For Android + +### Guide + +- Before publishing the Android application, we have to prepare the necessary credentials and information: + - A Play Store developer account. + - Your application's app id. This could be multiple bundle ids according to the number of application’s flavors. + - A new app on Play Store. + +- Add these variables as the secrets of CI: + - **ENV_PRODUCTION**: the production .env configuration file content. + - **GOOGLE_PLAY_SERVICE_ACCOUNT_JSON**: the json file content of the Play Store's Service Account for app publishing. Please check out [how to create the Service Account](https://support.staffbase.com/hc/en-us/articles/360018569579-Preparing-Automated-Publishing-for-Google-Play-Store). + +### Resources + +- [Build and release an Android app](https://docs.flutter.dev/deployment/android#build-an-apk). +- [Preparing Automated Publishing for Google Play Store](https://support.staffbase.com/hc/en-us/articles/360018569579-Preparing-Automated-Publishing-for-Google-Play-Store). + ## For iOS ### Guide -- Before deploying the iOS application, we have to prepare the necessary credentials and information: +- Before publishing the iOS application, we have to prepare the necessary credentials and information: - An Apple developer account. - Your application’s bundle id. This could be multiple bundle ids according to the number of application’s flavors. - - A new app's on Apple Store Connect that links to the bundle id. + - A new app on Apple Store Connect that links to the bundle id. - The access to Git’s [Match repository](https://codesigning.guide/). -- Create certificates for distribution and [code signing](https://codesigning.guide/) so we are able to fetch the certificates through [Match](https://docs.fastlane.tools/actions/match/). +- Create certificates for distribution and [code signing](https://codesigning.guide/) so we are able to fetch the certificates through the [Match](https://docs.fastlane.tools/actions/match/) repository. - Setup [Fastlane](https://docs.fastlane.tools/getting-started/ios/setup/) and [Match](https://docs.fastlane.tools/actions/match/). -- Adding these variables as the environment variable of CI: +- Add these variables as the secrets of CI: - **FASTLANE_USER**: This will be referred to in `Appfile` and `Fastfile`. Set your Apple ID to this variable. - **FASTLANE_PASSWORD**: This variable will be referred to internally in Fastlane. Set the password of your Apple ID to this variable. @@ -23,10 +41,10 @@ - **KEYCHAIN_PASSWORD**: We can create a keychain password for ourself and it could be anything. - **SSH_PRIVATE_KEY**: In order to fetch the distribution files from Git’s [Match repository](https://codesigning.guide/), we have to generate an SSH key and save it as the environment variable in CI. -- Run the corresponding workflows CI or `fastlane` commands and enjoy the result! +- Run the corresponding workflows or `fastlane` commands and enjoy the result! -### Resource +### Resources - [https://medium.com/flutter-community/deploying-flutter-ios-apps-with-fastlane-and-github-actions-2e87465e056e](https://medium.com/flutter-community/deploying-flutter-ios-apps-with-fastlane-and-github-actions-2e87465e056e) - [https://docs.flutter.dev/deployment/cd](https://docs.flutter.dev/deployment/cd) -- [https://jaysavsani07.medium.com/flutter-ci-cd-with-github-actions-fastlane-part-2-ios-a4b281921d39](https://jaysavsani07.medium.com/flutter-ci-cd-with-github-actions-fastlane-part-2-ios-a4b281921d39) \ No newline at end of file +- [https://jaysavsani07.medium.com/flutter-ci-cd-with-github-actions-fastlane-part-2-ios-a4b281921d39](https://jaysavsani07.medium.com/flutter-ci-cd-with-github-actions-fastlane-part-2-ios-a4b281921d39) From 5d11dbd87498b315ef53a12c9269350922e0993b Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Wed, 8 Mar 2023 14:15:26 +0700 Subject: [PATCH 17/21] [#61] Remove test branch config --- .github/workflows/android_deploy_production_to_playstore.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/android_deploy_production_to_playstore.yml b/.github/workflows/android_deploy_production_to_playstore.yml index 3e638d4a..a8c8f937 100644 --- a/.github/workflows/android_deploy_production_to_playstore.yml +++ b/.github/workflows/android_deploy_production_to_playstore.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - feature/61-setup-cd-to-build-and-deploy-android-app-to-playstore jobs: build_and_deploy_android: From f863a88ab487f8e40db08fa698a245029c73d346 Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Wed, 22 Mar 2023 10:43:33 +0700 Subject: [PATCH 18/21] [#61] Add missing "timeout-minutes" config to avoid the workflow hanging --- .github/workflows/android_deploy_production.yml | 1 + .github/workflows/android_deploy_production_to_playstore.yml | 1 + .github/workflows/android_deploy_staging.yml | 1 + .github/workflows/bump_version.yml | 1 + .github/workflows/test.yml | 1 + template/.github/workflows/android_deploy_production.yml | 1 + .../.github/workflows/android_deploy_production_to_playstore.yml | 1 + template/.github/workflows/android_deploy_staging.yml | 1 + template/.github/workflows/bump_version.yml | 1 + template/.github/workflows/ios_deploy_to_app_store.yml | 1 + template/.github/workflows/ios_deploy_to_testflight.yml | 1 + template/.github/workflows/test.yml | 1 + 12 files changed, 12 insertions(+) diff --git a/.github/workflows/android_deploy_production.yml b/.github/workflows/android_deploy_production.yml index 297e95a4..98b74a4c 100644 --- a/.github/workflows/android_deploy_production.yml +++ b/.github/workflows/android_deploy_production.yml @@ -9,6 +9,7 @@ jobs: build_and_deploy_android: name: Build & Deploy Android runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/android_deploy_production_to_playstore.yml b/.github/workflows/android_deploy_production_to_playstore.yml index a8c8f937..b84fb776 100644 --- a/.github/workflows/android_deploy_production_to_playstore.yml +++ b/.github/workflows/android_deploy_production_to_playstore.yml @@ -9,6 +9,7 @@ jobs: build_and_deploy_android: name: Build & Deploy Android runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/android_deploy_staging.yml b/.github/workflows/android_deploy_staging.yml index 54cdc2e4..44c8cd7b 100644 --- a/.github/workflows/android_deploy_staging.yml +++ b/.github/workflows/android_deploy_staging.yml @@ -9,6 +9,7 @@ jobs: build_and_deploy_android: name: Build & Deploy Android runs-on: ubuntu-latest + timeout-minutes: 30 environment: staging steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml index 5ea2fb77..c9cfcd6d 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/bump_version.yml @@ -12,6 +12,7 @@ jobs: bump_version: name: Bump version runs-on: ubuntu-latest + timeout-minutes: 5 steps: - name: Checkout the latest code uses: actions/checkout@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 24ebb680..83b608be 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,7 @@ jobs: test: name: Template initializing scripts test runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v2.3.2 diff --git a/template/.github/workflows/android_deploy_production.yml b/template/.github/workflows/android_deploy_production.yml index 95276223..50392a67 100644 --- a/template/.github/workflows/android_deploy_production.yml +++ b/template/.github/workflows/android_deploy_production.yml @@ -9,6 +9,7 @@ jobs: build_and_deploy_android: name: Build & Deploy Android runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/template/.github/workflows/android_deploy_production_to_playstore.yml b/template/.github/workflows/android_deploy_production_to_playstore.yml index 7c261c21..ccf553fc 100644 --- a/template/.github/workflows/android_deploy_production_to_playstore.yml +++ b/template/.github/workflows/android_deploy_production_to_playstore.yml @@ -9,6 +9,7 @@ jobs: build_and_deploy_android: name: Build & Deploy Android runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/template/.github/workflows/android_deploy_staging.yml b/template/.github/workflows/android_deploy_staging.yml index 1dcb514d..f231a2ba 100644 --- a/template/.github/workflows/android_deploy_staging.yml +++ b/template/.github/workflows/android_deploy_staging.yml @@ -9,6 +9,7 @@ jobs: build_and_deploy_android: name: Build & Deploy Android runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/template/.github/workflows/bump_version.yml b/template/.github/workflows/bump_version.yml index 737d76ee..2a91fce4 100644 --- a/template/.github/workflows/bump_version.yml +++ b/template/.github/workflows/bump_version.yml @@ -12,6 +12,7 @@ jobs: bump_version: name: Bump version runs-on: ubuntu-latest + timeout-minutes: 5 steps: - name: Checkout the latest code uses: actions/checkout@v3 diff --git a/template/.github/workflows/ios_deploy_to_app_store.yml b/template/.github/workflows/ios_deploy_to_app_store.yml index c16f847f..91749328 100644 --- a/template/.github/workflows/ios_deploy_to_app_store.yml +++ b/template/.github/workflows/ios_deploy_to_app_store.yml @@ -9,6 +9,7 @@ jobs: build_and_upload_to_app_store: name: Build And Upload iOS Application To AppStore runs-on: macOS-latest + timeout-minutes: 30 defaults: run: working-directory: template diff --git a/template/.github/workflows/ios_deploy_to_testflight.yml b/template/.github/workflows/ios_deploy_to_testflight.yml index 15e2d985..38b41fbf 100644 --- a/template/.github/workflows/ios_deploy_to_testflight.yml +++ b/template/.github/workflows/ios_deploy_to_testflight.yml @@ -9,6 +9,7 @@ jobs: build_and_upload_to_testflight: name: Build And Upload iOS Application To TestFlight runs-on: macOS-latest + timeout-minutes: 30 env: TEAM_ID: ${{ secrets.TEAM_ID }} FASTLANE_USER: ${{ secrets.FASTLANE_USER }} diff --git a/template/.github/workflows/test.yml b/template/.github/workflows/test.yml index bd27098d..074cf7ec 100644 --- a/template/.github/workflows/test.yml +++ b/template/.github/workflows/test.yml @@ -12,6 +12,7 @@ jobs: lint_and_test: name: Static code analyze & Unit test runs-on: ubuntu-latest + timeout-minutes: 30 environment: staging steps: - uses: actions/checkout@v2.3.2 From e681184449c6832f88b8ca3db6dc4ac489573a81 Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Wed, 22 Mar 2023 10:52:26 +0700 Subject: [PATCH 19/21] [#61] Add step name for checkout action for consistency --- .github/workflows/android_deploy_production.yml | 3 ++- .github/workflows/android_deploy_production_to_playstore.yml | 3 ++- .github/workflows/android_deploy_staging.yml | 3 ++- template/.github/workflows/android_deploy_production.yml | 3 ++- .../workflows/android_deploy_production_to_playstore.yml | 3 ++- template/.github/workflows/android_deploy_staging.yml | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android_deploy_production.yml b/.github/workflows/android_deploy_production.yml index 98b74a4c..b477ba13 100644 --- a/.github/workflows/android_deploy_production.yml +++ b/.github/workflows/android_deploy_production.yml @@ -11,7 +11,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v2 diff --git a/.github/workflows/android_deploy_production_to_playstore.yml b/.github/workflows/android_deploy_production_to_playstore.yml index b84fb776..abc8ef11 100644 --- a/.github/workflows/android_deploy_production_to_playstore.yml +++ b/.github/workflows/android_deploy_production_to_playstore.yml @@ -11,7 +11,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v2 diff --git a/.github/workflows/android_deploy_staging.yml b/.github/workflows/android_deploy_staging.yml index 44c8cd7b..8a98dfed 100644 --- a/.github/workflows/android_deploy_staging.yml +++ b/.github/workflows/android_deploy_staging.yml @@ -12,7 +12,8 @@ jobs: timeout-minutes: 30 environment: staging steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v2 diff --git a/template/.github/workflows/android_deploy_production.yml b/template/.github/workflows/android_deploy_production.yml index 50392a67..ebf53c87 100644 --- a/template/.github/workflows/android_deploy_production.yml +++ b/template/.github/workflows/android_deploy_production.yml @@ -11,7 +11,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - name: Setup Java JDK uses: actions/setup-java@v3 diff --git a/template/.github/workflows/android_deploy_production_to_playstore.yml b/template/.github/workflows/android_deploy_production_to_playstore.yml index ccf553fc..65cd2fe2 100644 --- a/template/.github/workflows/android_deploy_production_to_playstore.yml +++ b/template/.github/workflows/android_deploy_production_to_playstore.yml @@ -11,7 +11,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - name: Setup Java JDK uses: actions/setup-java@v3 diff --git a/template/.github/workflows/android_deploy_staging.yml b/template/.github/workflows/android_deploy_staging.yml index f231a2ba..79db2946 100644 --- a/template/.github/workflows/android_deploy_staging.yml +++ b/template/.github/workflows/android_deploy_staging.yml @@ -11,7 +11,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - name: Setup Java JDK uses: actions/setup-java@v3 From 6b14cdee4853dc0cc68a1eee4c2d209032b2b33b Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Wed, 22 Mar 2023 11:18:29 +0700 Subject: [PATCH 20/21] [#61] Typo: use "set up" instead of "setup" for action --- .github/wiki/Deployment.md | 2 +- .github/workflows/android_deploy_production.yml | 8 ++++---- .../workflows/android_deploy_production_to_playstore.yml | 8 ++++---- .github/workflows/android_deploy_staging.yml | 8 ++++---- .github/workflows/test.yml | 4 ++-- template/.github/workflows/android_deploy_production.yml | 6 +++--- .../workflows/android_deploy_production_to_playstore.yml | 6 +++--- template/.github/workflows/android_deploy_staging.yml | 6 +++--- template/.github/workflows/ios_deploy_to_app_store.yml | 2 +- template/.github/workflows/ios_deploy_to_testflight.yml | 2 +- template/.github/workflows/test.yml | 2 +- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/wiki/Deployment.md b/.github/wiki/Deployment.md index e34bcbd0..96a244d6 100644 --- a/.github/wiki/Deployment.md +++ b/.github/wiki/Deployment.md @@ -30,7 +30,7 @@ - The access to Git’s [Match repository](https://codesigning.guide/). - Create certificates for distribution and [code signing](https://codesigning.guide/) so we are able to fetch the certificates through the [Match](https://docs.fastlane.tools/actions/match/) repository. -- Setup [Fastlane](https://docs.fastlane.tools/getting-started/ios/setup/) and [Match](https://docs.fastlane.tools/actions/match/). +- Set up [Fastlane](https://docs.fastlane.tools/getting-started/ios/setup/) and [Match](https://docs.fastlane.tools/actions/match/). - Add these variables as the secrets of CI: - **FASTLANE_USER**: This will be referred to in `Appfile` and `Fastfile`. Set your Apple ID to this variable. diff --git a/.github/workflows/android_deploy_production.yml b/.github/workflows/android_deploy_production.yml index b477ba13..a6ab510c 100644 --- a/.github/workflows/android_deploy_production.yml +++ b/.github/workflows/android_deploy_production.yml @@ -14,7 +14,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Setup Python + - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.9' @@ -22,13 +22,13 @@ jobs: - name: Generate new project run: make run PACKAGE_NAME=co.nimblehq.flutter.template PROJECT_NAME=flutter_templates APP_NAME="Flutter Templates" - - name: Setup Java JDK + - name: Set up Java JDK uses: actions/setup-java@v3 with: distribution: 'adopt' java-version: '11' - - name: Setup Flutter environment + - name: Set up Flutter environment uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -40,7 +40,7 @@ jobs: - name: Run code generator. run: flutter packages pub run build_runner build --delete-conflicting-outputs - - name: Setup .env + - name: Set up .env env: ENV_PRODUCTION: ${{ secrets.ENV_PRODUCTION }} run: | diff --git a/.github/workflows/android_deploy_production_to_playstore.yml b/.github/workflows/android_deploy_production_to_playstore.yml index abc8ef11..db10317f 100644 --- a/.github/workflows/android_deploy_production_to_playstore.yml +++ b/.github/workflows/android_deploy_production_to_playstore.yml @@ -14,7 +14,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Setup Python + - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.9' @@ -22,13 +22,13 @@ jobs: - name: Generate new project run: make run PACKAGE_NAME=co.nimblehq.flutter.template PROJECT_NAME=flutter_templates APP_NAME="Flutter Templates" - - name: Setup Java JDK + - name: Set up Java JDK uses: actions/setup-java@v3 with: distribution: 'adopt' java-version: '11' - - name: Setup Flutter environment + - name: Set up Flutter environment uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -40,7 +40,7 @@ jobs: - name: Run code generator. run: flutter packages pub run build_runner build --delete-conflicting-outputs - - name: Setup .env + - name: Set up .env env: ENV_PRODUCTION: ${{ secrets.ENV_PRODUCTION }} run: | diff --git a/.github/workflows/android_deploy_staging.yml b/.github/workflows/android_deploy_staging.yml index 8a98dfed..4610d16a 100644 --- a/.github/workflows/android_deploy_staging.yml +++ b/.github/workflows/android_deploy_staging.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Setup Python + - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.9' @@ -23,13 +23,13 @@ jobs: - name: Generate new project run: make run PACKAGE_NAME=co.nimblehq.flutter.template PROJECT_NAME=flutter_templates APP_NAME="Flutter Templates" - - name: Setup Java JDK + - name: Set up Java JDK uses: actions/setup-java@v3 with: distribution: 'adopt' java-version: '11' - - name: Setup Flutter environment + - name: Set up Flutter environment uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -41,7 +41,7 @@ jobs: - name: Run code generator. run: flutter packages pub run build_runner build --delete-conflicting-outputs - - name: Setup .env.staging + - name: Set up .env.staging env: ENV_STAGING: ${{ secrets.ENV_STAGING }} run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 83b608be..0f7ec12f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/checkout@v2.3.2 - - name: Setup Python + - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.9' @@ -26,7 +26,7 @@ jobs: - name: Generate new project run: make run PACKAGE_NAME=co.nimblehq.flutter.template PROJECT_NAME=flutter_templates APP_NAME="Flutter Templates" - - name: Setup Flutter environment + - name: Set up Flutter environment uses: subosito/flutter-action@v2 with: channel: 'stable' diff --git a/template/.github/workflows/android_deploy_production.yml b/template/.github/workflows/android_deploy_production.yml index ebf53c87..6ab95f21 100644 --- a/template/.github/workflows/android_deploy_production.yml +++ b/template/.github/workflows/android_deploy_production.yml @@ -14,13 +14,13 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Setup Java JDK + - name: Set up Java JDK uses: actions/setup-java@v3 with: distribution: 'adopt' java-version: '11' - - name: Setup Flutter environment + - name: Set up Flutter environment uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -32,7 +32,7 @@ jobs: - name: Run code generator. run: flutter packages pub run build_runner build --delete-conflicting-outputs - - name: Setup .env + - name: Set up .env env: ENV_PRODUCTION: ${{ secrets.ENV_PRODUCTION }} run: | diff --git a/template/.github/workflows/android_deploy_production_to_playstore.yml b/template/.github/workflows/android_deploy_production_to_playstore.yml index 65cd2fe2..70c9c87f 100644 --- a/template/.github/workflows/android_deploy_production_to_playstore.yml +++ b/template/.github/workflows/android_deploy_production_to_playstore.yml @@ -14,13 +14,13 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Setup Java JDK + - name: Set up Java JDK uses: actions/setup-java@v3 with: distribution: 'adopt' java-version: '11' - - name: Setup Flutter environment + - name: Set up Flutter environment uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -32,7 +32,7 @@ jobs: - name: Run code generator. run: flutter packages pub run build_runner build --delete-conflicting-outputs - - name: Setup .env + - name: Set up .env env: ENV_PRODUCTION: ${{ secrets.ENV_PRODUCTION }} run: | diff --git a/template/.github/workflows/android_deploy_staging.yml b/template/.github/workflows/android_deploy_staging.yml index 79db2946..e0205efe 100644 --- a/template/.github/workflows/android_deploy_staging.yml +++ b/template/.github/workflows/android_deploy_staging.yml @@ -14,13 +14,13 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Setup Java JDK + - name: Set up Java JDK uses: actions/setup-java@v3 with: distribution: 'adopt' java-version: '11' - - name: Setup Flutter environment + - name: Set up Flutter environment uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -32,7 +32,7 @@ jobs: - name: Run code generator. run: flutter packages pub run build_runner build --delete-conflicting-outputs - - name: Setup .env.staging + - name: Set up .env.staging env: ENV_STAGING: ${{ secrets.ENV_STAGING }} run: | diff --git a/template/.github/workflows/ios_deploy_to_app_store.yml b/template/.github/workflows/ios_deploy_to_app_store.yml index 91749328..b5559f8a 100644 --- a/template/.github/workflows/ios_deploy_to_app_store.yml +++ b/template/.github/workflows/ios_deploy_to_app_store.yml @@ -29,7 +29,7 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - name: Setup Flutter environment + - name: Set up Flutter environment uses: subosito/flutter-action@v2 with: channel: 'stable' diff --git a/template/.github/workflows/ios_deploy_to_testflight.yml b/template/.github/workflows/ios_deploy_to_testflight.yml index 38b41fbf..e6e99080 100644 --- a/template/.github/workflows/ios_deploy_to_testflight.yml +++ b/template/.github/workflows/ios_deploy_to_testflight.yml @@ -26,7 +26,7 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - name: Setup Flutter environment + - name: Set up Flutter environment uses: subosito/flutter-action@v2 with: channel: 'stable' diff --git a/template/.github/workflows/test.yml b/template/.github/workflows/test.yml index 074cf7ec..dfc32f7f 100644 --- a/template/.github/workflows/test.yml +++ b/template/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v2.3.2 - - name: Setup Flutter environment + - name: Set up Flutter environment uses: subosito/flutter-action@v2 with: channel: 'stable' From 6a3bbce19c9ed30ba7b8ae32b7ebce5416977ba3 Mon Sep 17 00:00:00 2001 From: Luong Vo Date: Wed, 22 Mar 2023 11:34:57 +0700 Subject: [PATCH 21/21] [#61] Correct Flutter sdk name --- .github/workflows/android_deploy_production.yml | 4 ++-- .../workflows/android_deploy_production_to_playstore.yml | 4 ++-- .github/workflows/android_deploy_staging.yml | 4 ++-- .github/workflows/test.yml | 8 ++++---- template/.github/workflows/android_deploy_production.yml | 4 ++-- .../workflows/android_deploy_production_to_playstore.yml | 4 ++-- template/.github/workflows/android_deploy_staging.yml | 4 ++-- template/.github/workflows/ios_deploy_to_app_store.yml | 2 +- template/.github/workflows/ios_deploy_to_testflight.yml | 2 +- template/.github/workflows/test.yml | 8 ++++---- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/android_deploy_production.yml b/.github/workflows/android_deploy_production.yml index a6ab510c..7173c2b0 100644 --- a/.github/workflows/android_deploy_production.yml +++ b/.github/workflows/android_deploy_production.yml @@ -34,10 +34,10 @@ jobs: channel: 'stable' flutter-version: '3.3.10' - - name: Get flutter dependencies + - name: Get Flutter dependencies run: flutter pub get - - name: Run code generator. + - name: Run code generator run: flutter packages pub run build_runner build --delete-conflicting-outputs - name: Set up .env diff --git a/.github/workflows/android_deploy_production_to_playstore.yml b/.github/workflows/android_deploy_production_to_playstore.yml index db10317f..7381ec1d 100644 --- a/.github/workflows/android_deploy_production_to_playstore.yml +++ b/.github/workflows/android_deploy_production_to_playstore.yml @@ -34,10 +34,10 @@ jobs: channel: 'stable' flutter-version: '3.3.10' - - name: Get flutter dependencies + - name: Get Flutter dependencies run: flutter pub get - - name: Run code generator. + - name: Run code generator run: flutter packages pub run build_runner build --delete-conflicting-outputs - name: Set up .env diff --git a/.github/workflows/android_deploy_staging.yml b/.github/workflows/android_deploy_staging.yml index 4610d16a..05939515 100644 --- a/.github/workflows/android_deploy_staging.yml +++ b/.github/workflows/android_deploy_staging.yml @@ -35,10 +35,10 @@ jobs: channel: 'stable' flutter-version: '3.3.10' - - name: Get flutter dependencies + - name: Get Flutter dependencies run: flutter pub get - - name: Run code generator. + - name: Run code generator run: flutter packages pub run build_runner build --delete-conflicting-outputs - name: Set up .env.staging diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0f7ec12f..89125119 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,17 +32,17 @@ jobs: channel: 'stable' flutter-version: '3.3.10' - - name: Get flutter dependencies. + - name: Get Flutter dependencies run: flutter pub get - name: Run code generator run: flutter packages pub run build_runner build --delete-conflicting-outputs - - name: Check for any formatting issues in the code. + - name: Check for any formatting issues in the code run: flutter format --set-exit-if-changed . - - name: Statically analyze the Dart code for any errors. + - name: Statically analyze the Dart code for any errors run: flutter analyze . - - name: Run widget tests, unit tests. + - name: Run widget tests, unit tests run: flutter test --machine --coverage diff --git a/template/.github/workflows/android_deploy_production.yml b/template/.github/workflows/android_deploy_production.yml index 6ab95f21..e857d713 100644 --- a/template/.github/workflows/android_deploy_production.yml +++ b/template/.github/workflows/android_deploy_production.yml @@ -26,10 +26,10 @@ jobs: channel: 'stable' flutter-version: '3.3.10' - - name: Get flutter dependencies + - name: Get Flutter dependencies run: flutter pub get - - name: Run code generator. + - name: Run code generator run: flutter packages pub run build_runner build --delete-conflicting-outputs - name: Set up .env diff --git a/template/.github/workflows/android_deploy_production_to_playstore.yml b/template/.github/workflows/android_deploy_production_to_playstore.yml index 70c9c87f..d07ca14b 100644 --- a/template/.github/workflows/android_deploy_production_to_playstore.yml +++ b/template/.github/workflows/android_deploy_production_to_playstore.yml @@ -26,10 +26,10 @@ jobs: channel: 'stable' flutter-version: '3.3.10' - - name: Get flutter dependencies + - name: Get Flutter dependencies run: flutter pub get - - name: Run code generator. + - name: Run code generator run: flutter packages pub run build_runner build --delete-conflicting-outputs - name: Set up .env diff --git a/template/.github/workflows/android_deploy_staging.yml b/template/.github/workflows/android_deploy_staging.yml index e0205efe..70e1f42d 100644 --- a/template/.github/workflows/android_deploy_staging.yml +++ b/template/.github/workflows/android_deploy_staging.yml @@ -26,10 +26,10 @@ jobs: channel: 'stable' flutter-version: '3.3.10' - - name: Get flutter dependencies + - name: Get Flutter dependencies run: flutter pub get - - name: Run code generator. + - name: Run code generator run: flutter packages pub run build_runner build --delete-conflicting-outputs - name: Set up .env.staging diff --git a/template/.github/workflows/ios_deploy_to_app_store.yml b/template/.github/workflows/ios_deploy_to_app_store.yml index b5559f8a..7e4582aa 100644 --- a/template/.github/workflows/ios_deploy_to_app_store.yml +++ b/template/.github/workflows/ios_deploy_to_app_store.yml @@ -35,7 +35,7 @@ jobs: channel: 'stable' flutter-version: '3.3.10' - - name: Get flutter dependencies + - name: Get Flutter dependencies run: flutter pub get - name: Run code generator diff --git a/template/.github/workflows/ios_deploy_to_testflight.yml b/template/.github/workflows/ios_deploy_to_testflight.yml index e6e99080..04dcb757 100644 --- a/template/.github/workflows/ios_deploy_to_testflight.yml +++ b/template/.github/workflows/ios_deploy_to_testflight.yml @@ -32,7 +32,7 @@ jobs: channel: 'stable' flutter-version: '3.3.10' - - name: Get flutter dependencies + - name: Get Flutter dependencies run: flutter pub get - name: Run code generator diff --git a/template/.github/workflows/test.yml b/template/.github/workflows/test.yml index dfc32f7f..3bc45d98 100644 --- a/template/.github/workflows/test.yml +++ b/template/.github/workflows/test.yml @@ -23,19 +23,19 @@ jobs: channel: 'stable' flutter-version: '3.3.10' - - name: Get flutter dependencies. + - name: Get Flutter dependencies run: flutter pub get - name: Run code generator run: flutter packages pub run build_runner build --delete-conflicting-outputs - - name: Check for any formatting issues in the code. + - name: Check for any formatting issues in the code run: flutter format --set-exit-if-changed . - - name: Statically analyze the Dart code for any errors. + - name: Statically analyze the Dart code for any errors run: flutter analyze . - - name: Run widget tests, unit tests. + - name: Run widget tests, unit tests run: flutter test --machine --coverage - name: Upload coverage to codecov