forked from fleaflet/flutter_map
-
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.
Add automatic example app deployment to web (fleaflet#1516)
Uses Firebase Hosting & https://github.com/FirebaseExtended/action-hosting-deploy to build and deploy the example app on web. Creates preview sites for PRs, and deploys to the live site on pushes to the master branch. We're looking for FirebaseExtended/action-hosting-deploy#279 to be merged by 2023/05/31. We're looking for axel-op/dart-package-analyzer#22 to be resolved by 2023/05/31. Otherwise, this action will fail (note that the existing action will fail by this date currently anyway).
- Loading branch information
1 parent
0d522d2
commit 1bbea9d
Showing
35 changed files
with
239 additions
and
145 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projects": { | ||
"default": "fleaflet-firebase" | ||
} | ||
} |
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,61 @@ | ||
name: Build IO Example Apps | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build-android: | ||
name: "Android" | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./example | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Java 17 Environment | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: "17" | ||
- name: Setup Flutter Environment | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
- name: Build Android Application | ||
run: flutter build apk | ||
- name: Archive Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: apk-build | ||
path: example/build/app/outputs/apk/release | ||
if-no-files-found: error | ||
|
||
build-windows: | ||
name: "Windows" | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
working-directory: ./example | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Java 17 Environment | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: "17" | ||
- name: Setup Flutter Environment | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
- name: Build Windows Application | ||
run: flutter build windows | ||
- name: Create Windows Application Installer | ||
run: iscc "windowsApplicationInstallerSetup.iss" | ||
working-directory: . | ||
- name: Archive Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: exe-build | ||
path: windowsTemp/WindowsApplication.exe | ||
if-no-files-found: error |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build (PR) | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: "Score, Analyse & Test" | ||
uses: ./.github/workflows/test.yml | ||
|
||
build-io: | ||
name: "Build IO Example Apps" | ||
needs: test | ||
uses: ./.github/workflows/build_io.yml | ||
|
||
build-web: | ||
name: "Build & Deploy Web Example App" | ||
runs-on: ubuntu-latest | ||
needs: test | ||
defaults: | ||
run: | ||
working-directory: ./example | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Flutter Environment | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
- name: Build Web Application | ||
run: flutter build web --web-renderer canvaskit | ||
- name: Archive Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: web-build | ||
path: example/build/web | ||
if-no-files-found: error | ||
- name: Publish Preview Web App | ||
uses: FirebaseExtended/action-hosting-deploy@main | ||
with: | ||
repoToken: "${{ secrets.GITHUB_TOKEN }}" | ||
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_FLEAFLET }}" | ||
expires: 30d | ||
projectId: fleaflet-firebase |
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,50 @@ | ||
name: Build (Push) | ||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: "Score, Analyse & Test" | ||
uses: ./.github/workflows/test.yml | ||
|
||
build-io: | ||
name: "Build IO Example Apps" | ||
needs: test | ||
uses: ./.github/workflows/build_io.yml | ||
|
||
build-web: | ||
name: "Build & Deploy Web Example App" | ||
runs-on: ubuntu-latest | ||
needs: test | ||
defaults: | ||
run: | ||
working-directory: ./example | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Flutter Environment | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
- name: Build Web Application | ||
run: flutter build web --web-renderer canvaskit | ||
- name: Archive Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: web-build | ||
path: example/build/web | ||
if-no-files-found: error | ||
- name: Publish Live Web App | ||
uses: FirebaseExtended/action-hosting-deploy@main | ||
with: | ||
repoToken: "${{ secrets.GITHUB_TOKEN }}" | ||
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_FLEAFLET }}" | ||
channelId: live | ||
projectId: fleaflet-firebase |
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,57 @@ | ||
name: Score, Analyse & Test | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
score-package: | ||
name: "Score Package" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Run Dart Package Analyser | ||
uses: axel-op/dart-package-analyzer@master | ||
id: analysis | ||
with: | ||
githubToken: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Check Package Scores | ||
env: | ||
TOTAL: ${{ steps.analysis.outputs.total }} | ||
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }} | ||
run: | | ||
if (( $TOTAL < $TOTAL_MAX )) | ||
then | ||
echo Package score less than available score. Improve the score! | ||
exit 1 | ||
fi | ||
analyse-code: | ||
name: "Analyse Code" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Flutter Environment | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
- name: Get All Dependencies | ||
run: flutter pub get | ||
- name: Check Formatting | ||
run: dart format --output=none --set-exit-if-changed . | ||
- name: Check Lints | ||
run: dart analyze --fatal-infos --fatal-warnings | ||
|
||
run-tests: | ||
name: "Run Tests" | ||
runs-on: ubuntu-latest | ||
needs: analyse-code | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Flutter Environment | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
- name: Run Tests | ||
run: flutter test -r expanded |
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
Binary file modified
BIN
+3.8 KB
(820%)
example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.55 KB
(460%)
example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.76 KB
(780%)
example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.77 KB
(1100%)
example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+11.7 KB
(930%)
example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+176 KB
(1700%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+174 Bytes
(130%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+255 Bytes
(120%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+603 Bytes
(140%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+83 Bytes
(110%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+388 Bytes
(120%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.47 KB
(290%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+255 Bytes
(120%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.05 KB
(210%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.05 KB
(290%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.9 KB
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.43 KB
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.11 KB
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.9 KB
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.05 KB
(290%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+11.1 KB
(400%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.65 KB
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.92 KB
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.43 KB
(230%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.56 KB
(330%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.97 KB
(380%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
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
Oops, something went wrong.