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 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/.github/wiki/Deployment.md b/.github/wiki/Deployment.md index 7465ba72..96a244d6 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/). -- 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: +- 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. +- 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. - **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) diff --git a/.github/workflows/android_deploy_production.yml b/.github/workflows/android_deploy_production.yml new file mode 100644 index 00000000..7173c2b0 --- /dev/null +++ b/.github/workflows/android_deploy_production.yml @@ -0,0 +1,59 @@ +name: Android - Deploy Production build to Firebase + +on: + push: + branches: + - main + +jobs: + build_and_deploy_android: + name: Build & Deploy Android + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up 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: Set up Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Set up 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: Set up .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/.github/workflows/android_deploy_production_to_playstore.yml b/.github/workflows/android_deploy_production_to_playstore.yml new file mode 100644 index 00000000..7381ec1d --- /dev/null +++ b/.github/workflows/android_deploy_production_to_playstore.yml @@ -0,0 +1,62 @@ +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 + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up 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: Set up Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Set up 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: Set up .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 + + # 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 diff --git a/.github/workflows/android_deploy_staging.yml b/.github/workflows/android_deploy_staging.yml new file mode 100644 index 00000000..05939515 --- /dev/null +++ b/.github/workflows/android_deploy_staging.yml @@ -0,0 +1,60 @@ +name: Android - Deploy Staging build to Firebase + +on: + push: + branches: + - develop + +jobs: + build_and_deploy_android: + name: Build & Deploy Android + runs-on: ubuntu-latest + timeout-minutes: 30 + environment: staging + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up 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: Set up Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Set up 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: Set up .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: 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 }} + groups: nimble + file: build/app/outputs/flutter-apk/app-staging-debug.apk diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml index 8daac97c..c9cfcd6d 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/bump_version.yml @@ -12,16 +12,19 @@ jobs: bump_version: name: Bump version runs-on: ubuntu-latest + timeout-minutes: 5 steps: - name: Checkout the latest code - uses: actions/checkout@v2 + 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 + + - name: Create pull request uses: peter-evans/create-pull-request@v4 with: assignees: ${{ secrets.GITHUB_USER }} @@ -34,14 +37,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/.github/workflows/test.yml b/.github/workflows/test.yml index 56c63b49..89125119 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,32 +14,35 @@ jobs: test: name: Template initializing scripts test runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v2.3.2 - - uses: actions/setup-python@v2 + - name: Set up 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: Set up 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. + - 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/README.md b/README.md index ba08e5b7..880a0ac3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,11 @@ 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` + +## Documentation + +Checkout the [Wiki](https://github.com/nimblehq/flutter-templates/wiki) page to access the full documentation. ## Use the template @@ -28,7 +32,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/.github/workflows/android_deploy_production.yml b/template/.github/workflows/android_deploy_production.yml new file mode 100644 index 00000000..e857d713 --- /dev/null +++ b/template/.github/workflows/android_deploy_production.yml @@ -0,0 +1,51 @@ +name: Android - Deploy Production build to Firebase + +on: + push: + branches: + - main + +jobs: + build_and_deploy_android: + name: Build & Deploy Android + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Set up 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: Set up .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_to_playstore.yml b/template/.github/workflows/android_deploy_production_to_playstore.yml new file mode 100644 index 00000000..d07ca14b --- /dev/null +++ b/template/.github/workflows/android_deploy_production_to_playstore.yml @@ -0,0 +1,52 @@ +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 + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Set up 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: Set up .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: 1.0 + whatsNewDirectory: .github/workflows/whatsnew diff --git a/template/.github/workflows/android_deploy_staging.yml b/template/.github/workflows/android_deploy_staging.yml new file mode 100644 index 00000000..70e1f42d --- /dev/null +++ b/template/.github/workflows/android_deploy_staging.yml @@ -0,0 +1,51 @@ +name: Android - Deploy Staging build to Firebase + +on: + push: + branches: + - develop + +jobs: + build_and_deploy_android: + name: Build & Deploy Android + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Set up 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: Set up .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: 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 }} + groups: nimble + file: build/app/outputs/flutter-apk/app-staging-debug.apk diff --git a/template/.github/workflows/bump_version.yml b/template/.github/workflows/bump_version.yml new file mode 100644 index 00000000..2a91fce4 --- /dev/null +++ b/template/.github/workflows/bump_version.yml @@ -0,0 +1,50 @@ +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 + timeout-minutes: 5 + 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' ./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 diff --git a/template/.github/workflows/ios_deploy_to_app_store.yml b/template/.github/workflows/ios_deploy_to_app_store.yml index f7eb19e6..7e4582aa 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 @@ -28,12 +29,13 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - uses: subosito/flutter-action@v1 + - name: Set up Flutter environment + uses: subosito/flutter-action@v2 with: channel: 'stable' - flutter-version: '2.10.3' + 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 d81777e5..04dcb757 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 }} @@ -25,12 +26,13 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - uses: subosito/flutter-action@v1 + - name: Set up Flutter environment + uses: subosito/flutter-action@v2 with: channel: 'stable' - flutter-version: '2.10.3' + 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 05abca60..3bc45d98 100644 --- a/template/.github/workflows/test.yml +++ b/template/.github/workflows/test.yml @@ -12,34 +12,35 @@ 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 - # Setup the flutter environment. - - uses: subosito/flutter-action@v1 + - name: Set up 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. + - 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 - - 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 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 + 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 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"