generated from xmartlabs/flutter-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add ios and web compilation in the ci and add web deploy to the…
… CD (#86)
- Loading branch information
Showing
13 changed files
with
334 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
- main | ||
|
||
jobs: | ||
build: | ||
checks_and_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -30,10 +30,6 @@ jobs: | |
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
working-directory: 'android' | ||
- name: Create google-services.json | ||
uses: timheuer/[email protected] | ||
with: | ||
|
@@ -56,8 +52,98 @@ jobs: | |
uses: maierj/[email protected] | ||
with: | ||
lane: 'tests' | ||
build_android_web: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
- uses: dart-lang/[email protected] | ||
- name: Cache FVM & Flutter | ||
uses: actions/cache@v3 | ||
with: | ||
path: /home/runner/fvm/versions/ | ||
key: ${{ runner.os }}-${{ hashFiles('**/fvm_config.json') }} | ||
- name: Cache pub cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: /home/runner/.pub-cache/ | ||
key: ${{ runner.os }}-pub-cache | ||
- name: Install FVM && Flutter | ||
run: dart pub global activate fvm --verbose && fvm install --verbose && fvm use --force --verbose | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
working-directory: 'android' | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
working-directory: 'web' | ||
- name: Create google-services.json | ||
uses: timheuer/[email protected] | ||
with: | ||
fileName: 'google-services.json' | ||
fileDir: 'android/app/' | ||
encodedString: ${{ secrets.ANDROID_GOOGLE_SERVICES_JSON_BASE_64 }} | ||
- name: Get dependencies | ||
uses: maierj/[email protected] | ||
with: | ||
lane: 'fetch_dependencies' | ||
- name: 'Build android app' | ||
uses: maierj/[email protected] | ||
with: | ||
lane: 'android build_dev_debug_apk' | ||
subdirectory: 'android' | ||
- name: 'Build web app' | ||
uses: maierj/[email protected] | ||
with: | ||
lane: 'web build_dev' | ||
subdirectory: 'web' | ||
build_ios: | ||
runs-on: macOS-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
- uses: dart-lang/[email protected] | ||
- name: Cache FVM & Flutter | ||
uses: actions/cache@v3 | ||
with: | ||
path: /home/runner/fvm/versions/ | ||
key: ${{ runner.os }}-${{ hashFiles('**/fvm_config.json') }} | ||
- name: Cache pub cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: /home/runner/.pub-cache/ | ||
key: ${{ runner.os }}-pub-cache | ||
- name: Install FVM && Flutter | ||
run: dart pub global activate fvm --verbose && fvm install --verbose && fvm use --force --verbose | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
working-directory: 'ios' | ||
- name: Create google-services.json | ||
uses: timheuer/[email protected] | ||
with: | ||
fileName: 'google-services.json' | ||
fileDir: 'android/app/' | ||
encodedString: ${{ secrets.ANDROID_GOOGLE_SERVICES_JSON_BASE_64 }} | ||
- name: Get dependencies | ||
uses: maierj/[email protected] | ||
with: | ||
lane: 'fetch_dependencies' | ||
- name: 'Build ios app' | ||
uses: maierj/[email protected] | ||
with: | ||
lane: 'ios build_ipa_dev' | ||
subdirectory: 'ios' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../.ruby-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import "../../fastlane/Fastfile" | ||
|
||
default_platform(:web) | ||
platform :web do | ||
desc "**Build dev debug app**" | ||
lane :build_dev do |options| | ||
build_flutter(build_platform: 'web', flavor: 'dev') | ||
end | ||
|
||
desc "**Submit a new Staging Build to Firebase Hosting**" | ||
desc "#### Envs\n" + | ||
" * **`FIREBASE_SERVICE_ACCOUNT_FILE`**: The path to your Google service account json file.\n" | ||
lane :deploy_firebase_app_distribution_dev_staging do |options| | ||
build_dev | ||
sh_on_root(command: 'firebase hosting:channel:deploy staging') | ||
end | ||
|
||
desc "**Submit a new Staging Build to Firebase Hosting**" | ||
desc "#### Envs\n" + | ||
" * **`FIREBASE_SERVICE_ACCOUNT_FILE`**: The path to your Google service account json file.\n" | ||
lane :deploy_firebase_app_distribution_prod do |options| | ||
build_flutter(build_platform: 'web', flavor: 'prod') | ||
sh_on_root(command: 'firebase deploy') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Autogenerated by fastlane | ||
# | ||
# Ensure this file is checked in to source control! | ||
|
||
gem 'fastlane-plugin-flutter_version' | ||
gem 'fastlane-plugin-firebase_app_distribution' |
Oops, something went wrong.