From 4a1207b0e5185ef610963a675695c1abe62f35d4 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 00:52:58 +0900 Subject: [PATCH 01/19] feat: add assets package and update dependencies --- assets/pubspec.yaml | 14 +++ pubspec.yaml | 3 + .../preparation_repository_impl_test.dart | 1 - widgetbook/.gitignore | 2 + widgetbook/assets | 1 + widgetbook/ios/Podfile.lock | 100 +++++++++++++++--- .../ios/Runner.xcodeproj/project.pbxproj | 18 ++++ widgetbook/lib/main.dart | 2 +- widgetbook/lib/reorderable_list.dart | 15 ++- widgetbook/lib/tile.dart | 6 +- widgetbook/macos/Runner/AppDelegate.swift | 4 + widgetbook/pubspec.lock | 64 +++++++++++ widgetbook/pubspec.yaml | 4 +- 13 files changed, 215 insertions(+), 19 deletions(-) create mode 100644 assets/pubspec.yaml create mode 120000 widgetbook/assets diff --git a/assets/pubspec.yaml b/assets/pubspec.yaml new file mode 100644 index 00000000..4ddc1b91 --- /dev/null +++ b/assets/pubspec.yaml @@ -0,0 +1,14 @@ +name: assets +description: > + Holds the assets for the app. The assets are included in a + separate package, to be able to share it with Widgetbook app. + +version: 0.0.0 +publish_to: none + +environment: + sdk: ">=3.1.0 <4.0.0" + +flutter: + assets: + - . \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 038c9f0a..972d3e27 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -30,6 +30,9 @@ environment: dependencies: flutter: sdk: flutter + + assets: + path: assets drift: ^2.21.0 diff --git a/test/data/repositories/preparation_repository_impl_test.dart b/test/data/repositories/preparation_repository_impl_test.dart index abf7b12c..ca53b89c 100644 --- a/test/data/repositories/preparation_repository_impl_test.dart +++ b/test/data/repositories/preparation_repository_impl_test.dart @@ -17,7 +17,6 @@ void main() { final scheduleEntityId = uuid.v7(); final preparationStepEntityId = uuid.v7(); - final userEntityId = uuid.v7(); final tPreparationStepList = [ PreparationStepEntity( diff --git a/widgetbook/.gitignore b/widgetbook/.gitignore index 29a3a501..79c113f9 100644 --- a/widgetbook/.gitignore +++ b/widgetbook/.gitignore @@ -5,9 +5,11 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ migrate_working_dir/ # IntelliJ related diff --git a/widgetbook/assets b/widgetbook/assets new file mode 120000 index 00000000..ec2e4be2 --- /dev/null +++ b/widgetbook/assets @@ -0,0 +1 @@ +../assets \ No newline at end of file diff --git a/widgetbook/ios/Podfile.lock b/widgetbook/ios/Podfile.lock index fbfe7818..6357fae0 100644 --- a/widgetbook/ios/Podfile.lock +++ b/widgetbook/ios/Podfile.lock @@ -1,49 +1,125 @@ PODS: + - AppAuth (1.7.6): + - AppAuth/Core (= 1.7.6) + - AppAuth/ExternalUserAgent (= 1.7.6) + - AppAuth/Core (1.7.6) + - AppAuth/ExternalUserAgent (1.7.6): + - AppAuth/Core - Flutter (1.0.0) + - flutter_appauth (0.0.1): + - AppAuth (= 1.7.6) + - Flutter + - flutter_web_auth (0.6.0): + - Flutter + - google_sign_in_ios (0.0.1): + - AppAuth (>= 1.7.4) + - Flutter + - FlutterMacOS + - GoogleSignIn (~> 7.1) + - GTMSessionFetcher (>= 3.4.0) + - GoogleSignIn (7.1.0): + - AppAuth (< 2.0, >= 1.7.3) + - GTMAppAuth (< 5.0, >= 4.1.1) + - GTMSessionFetcher/Core (~> 3.3) + - GTMAppAuth (4.1.1): + - AppAuth/Core (~> 1.7) + - GTMSessionFetcher/Core (< 4.0, >= 3.3) + - GTMSessionFetcher (3.5.0): + - GTMSessionFetcher/Full (= 3.5.0) + - GTMSessionFetcher/Core (3.5.0) + - GTMSessionFetcher/Full (3.5.0): + - GTMSessionFetcher/Core + - kakao_flutter_sdk_common (1.9.6): + - Flutter - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - - sqlite3 (3.47.0): - - sqlite3/common (= 3.47.0) - - sqlite3/common (3.47.0) - - sqlite3/dbstatvtab (3.47.0): + - shared_preferences_foundation (0.0.1): + - Flutter + - FlutterMacOS + - sqlite3 (3.47.1): + - sqlite3/common (= 3.47.1) + - sqlite3/common (3.47.1) + - sqlite3/dbstatvtab (3.47.1): - sqlite3/common - - sqlite3/fts5 (3.47.0): + - sqlite3/fts5 (3.47.1): - sqlite3/common - - sqlite3/perf-threadsafe (3.47.0): + - sqlite3/perf-threadsafe (3.47.1): - sqlite3/common - - sqlite3/rtree (3.47.0): + - sqlite3/rtree (3.47.1): - sqlite3/common - sqlite3_flutter_libs (0.0.1): - Flutter - - sqlite3 (~> 3.47.0) + - FlutterMacOS + - sqlite3 (~> 3.47.1) - sqlite3/dbstatvtab - sqlite3/fts5 - sqlite3/perf-threadsafe - sqlite3/rtree + - url_launcher_ios (0.0.1): + - Flutter + - webview_flutter_wkwebview (0.0.1): + - Flutter + - FlutterMacOS DEPENDENCIES: - Flutter (from `Flutter`) + - flutter_appauth (from `.symlinks/plugins/flutter_appauth/ios`) + - flutter_web_auth (from `.symlinks/plugins/flutter_web_auth/ios`) + - google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) + - kakao_flutter_sdk_common (from `.symlinks/plugins/kakao_flutter_sdk_common/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - - sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`) + - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) + - sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/darwin`) + - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) + - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/darwin`) SPEC REPOS: trunk: + - AppAuth + - GoogleSignIn + - GTMAppAuth + - GTMSessionFetcher - sqlite3 EXTERNAL SOURCES: Flutter: :path: Flutter + flutter_appauth: + :path: ".symlinks/plugins/flutter_appauth/ios" + flutter_web_auth: + :path: ".symlinks/plugins/flutter_web_auth/ios" + google_sign_in_ios: + :path: ".symlinks/plugins/google_sign_in_ios/darwin" + kakao_flutter_sdk_common: + :path: ".symlinks/plugins/kakao_flutter_sdk_common/ios" path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/darwin" + shared_preferences_foundation: + :path: ".symlinks/plugins/shared_preferences_foundation/darwin" sqlite3_flutter_libs: - :path: ".symlinks/plugins/sqlite3_flutter_libs/ios" + :path: ".symlinks/plugins/sqlite3_flutter_libs/darwin" + url_launcher_ios: + :path: ".symlinks/plugins/url_launcher_ios/ios" + webview_flutter_wkwebview: + :path: ".symlinks/plugins/webview_flutter_wkwebview/darwin" SPEC CHECKSUMS: + AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + flutter_appauth: aff60f61e4a80b8b5c051615f00bf8f3b54fc5e8 + flutter_web_auth: acc15a8fd7bba796a933c724a6dffc3d00f07c27 + google_sign_in_ios: 07375bfbf2620bc93a602c0e27160d6afc6ead38 + GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db + GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de + GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 + kakao_flutter_sdk_common: 4f10f98226da5d0f7cbdeeaed5cc21f144515209 path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 - sqlite3: 0aa20658a9b238a3b1ff7175eb7bdd863b0ab4fd - sqlite3_flutter_libs: b55ef23cfafea5318ae5081e0bf3fbbce8417c94 + shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 + sqlite3: 1e522f0938463e44b7faf50393b40bdc1e1e456d + sqlite3_flutter_libs: 1b4e98da20ebd4e9b1240269b78cdcf492dbe9f3 + url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe + webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4 PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796 diff --git a/widgetbook/ios/Runner.xcodeproj/project.pbxproj b/widgetbook/ios/Runner.xcodeproj/project.pbxproj index ac0fbc08..364195bd 100644 --- a/widgetbook/ios/Runner.xcodeproj/project.pbxproj +++ b/widgetbook/ios/Runner.xcodeproj/project.pbxproj @@ -199,6 +199,7 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 997A6D7B5D7BB88E519EB28C /* [CP] Embed Pods Frameworks */, + 6521A2BE52EA95EAC49B9CCB /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -308,6 +309,23 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 6521A2BE52EA95EAC49B9CCB /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; diff --git a/widgetbook/lib/main.dart b/widgetbook/lib/main.dart index ed6d3477..608b3199 100644 --- a/widgetbook/lib/main.dart +++ b/widgetbook/lib/main.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:on_time_front/shared/theme/theme.dart'; +import 'package:on_time_front/presentation/shared/theme/theme.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/widgetbook/lib/reorderable_list.dart b/widgetbook/lib/reorderable_list.dart index 36e6d83a..b989ba92 100644 --- a/widgetbook/lib/reorderable_list.dart +++ b/widgetbook/lib/reorderable_list.dart @@ -1,8 +1,21 @@ import 'package:flutter/material.dart'; +import 'package:on_time_front/presentation/onboarding/onboarding_screen.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; import 'package:on_time_front/presentation/onboarding/preparation_reordarable_list.dart'; @widgetbook.UseCase(name: 'Default', type: PreparationReorderableList) Widget buildTileUseCase(BuildContext context) { - return const Scaffold(body: PreparationReorderableList()); + return Scaffold( + body: PreparationReorderableList( + preparationOrderingList: [ + PreparationStepWithOriginalIndex( + originalIndex: 0, + preparationStep: PreparationStepWithNameAndId( + id: '1', + preparationName: 'Preparation 1', + ), + ), + ], + onReorder: (int oldIndex, int newIndex) {}, + )); } diff --git a/widgetbook/lib/tile.dart b/widgetbook/lib/tile.dart index 9515f310..d76dcd14 100644 --- a/widgetbook/lib/tile.dart +++ b/widgetbook/lib/tile.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:on_time_front/shared/components/tile.dart'; -import 'package:on_time_front/shared/components/check_button.dart'; -import 'package:on_time_front/shared/theme/tile_style.dart'; +import 'package:on_time_front/presentation/shared/components/check_button.dart'; +import 'package:on_time_front/presentation/shared/components/tile.dart'; +import 'package:on_time_front/presentation/shared/theme/tile_style.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/widgetbook/macos/Runner/AppDelegate.swift b/widgetbook/macos/Runner/AppDelegate.swift index 8e02df28..b3c17614 100644 --- a/widgetbook/macos/Runner/AppDelegate.swift +++ b/widgetbook/macos/Runner/AppDelegate.swift @@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } } diff --git a/widgetbook/pubspec.lock b/widgetbook/pubspec.lock index 83306e6d..5390e371 100644 --- a/widgetbook/pubspec.lock +++ b/widgetbook/pubspec.lock @@ -54,6 +54,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.11.0" + bloc: + dependency: transitive + description: + name: bloc + sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e" + url: "https://pub.dev" + source: hosted + version: "8.1.4" boolean_selector: dependency: transitive description: @@ -307,6 +315,14 @@ packages: url: "https://pub.dev" source: hosted version: "8.0.0" + flutter_bloc: + dependency: transitive + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" flutter_lints: dependency: "direct dev" description: @@ -365,6 +381,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.0" + get_it: + dependency: transitive + description: + name: get_it + sha256: f126a3e286b7f5b578bf436d5592968706c4c1de28a228b870ce375d9f743103 + url: "https://pub.dev" + source: hosted + version: "8.0.3" glob: dependency: transitive description: @@ -461,6 +485,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + injectable: + dependency: transitive + description: + name: injectable + sha256: "5e1556ea1d374fe44cbe846414d9bab346285d3d8a1da5877c01ad0774006068" + url: "https://pub.dev" + source: hosted + version: "2.5.0" inspector: dependency: transitive description: @@ -469,6 +501,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" + intl: + dependency: transitive + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" io: dependency: transitive description: @@ -780,6 +820,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" + provider: + dependency: transitive + description: + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + url: "https://pub.dev" + source: hosted + version: "6.1.2" pub_semver: dependency: transitive description: @@ -900,6 +948,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" + simple_gesture_detector: + dependency: transitive + description: + name: simple_gesture_detector + sha256: ba2cd5af24ff20a0b8d609cec3f40e5b0744d2a71804a2616ae086b9c19d19a3 + url: "https://pub.dev" + source: hosted + version: "0.2.1" sky_engine: dependency: transitive description: flutter @@ -985,6 +1041,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + table_calendar: + dependency: transitive + description: + name: table_calendar + sha256: b2896b7c86adf3a4d9c911d860120fe3dbe03c85db43b22fd61f14ee78cdbb63 + url: "https://pub.dev" + source: hosted + version: "3.1.3" term_glyph: dependency: transitive description: diff --git a/widgetbook/pubspec.yaml b/widgetbook/pubspec.yaml index 95ff7c21..830ec6c2 100644 --- a/widgetbook/pubspec.yaml +++ b/widgetbook/pubspec.yaml @@ -9,6 +9,8 @@ environment: dependencies: on_time_front: path: ../ + assets: + path: ../assets/ flutter: sdk: flutter widgetbook: ^3.10.0 @@ -25,4 +27,4 @@ dev_dependencies: flutter: uses-material-design: true assets: - - ../assets/ + - assets/ From 0eb4ca26534850bebf831832b7d6965a569e43e1 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 13:24:26 +0900 Subject: [PATCH 02/19] feat: add GitHub Actions workflow for Firebase Hosting deployment on pull requests --- .../firebase-hosting-pull-request.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/firebase-hosting-pull-request.yml diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml new file mode 100644 index 00000000..3787466d --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -0,0 +1,23 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on PR +on: pull_request +permissions: + checks: write + contents: read + pull-requests: write +jobs: + build_and_preview: + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm ci + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: ${{ secrets.GITHUB_TOKEN }} + firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ON_TIME_FRONT_WIDGETBOOK }} + projectId: on-time-front-widgetbook + env: + FIREBASE_CLI_EXPERIMENTS: webframeworks From cd7e9d69769a60697f0ecd9511277b4efba15e19 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 13:29:30 +0900 Subject: [PATCH 03/19] feat: install npm packages before Firebase Hosting deployment --- .github/workflows/firebase-hosting-pull-request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 3787466d..dd1662d6 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -13,6 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - run: npm i - run: npm ci - uses: FirebaseExtended/action-hosting-deploy@v0 with: From 4e5d9b336cfeb3b8d99b6e981b386058695affaa Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 13:30:12 +0900 Subject: [PATCH 04/19] fix: change npm install command to npm init in GitHub Actions workflow --- .github/workflows/firebase-hosting-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index dd1662d6..9390fd88 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: npm i + - run: npm init - run: npm ci - uses: FirebaseExtended/action-hosting-deploy@v0 with: From e0bc08482f30a9d6c30b815a1cd6e8a67dcd6089 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 13:33:59 +0900 Subject: [PATCH 05/19] feat: add initial package.json for Flutter project setup --- package.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 00000000..ae94a40f --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "on_time_front", + "version": "1.0.0", + "description": "A new Flutter project.", + "main": "index.js", + "directories": { + "lib": "lib", + "test": "test" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC" +} From 575e578d93fe7eafff05eb9b6df74a868f6f39c4 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 13:35:06 +0900 Subject: [PATCH 06/19] feat: update GitHub Actions workflow to set Node.js version before npm install --- .github/workflows/firebase-hosting-pull-request.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 9390fd88..23a978ed 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -13,7 +13,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: npm init + - uses: actions/setup-node@v2 + with: + node-version: '14' - run: npm ci - uses: FirebaseExtended/action-hosting-deploy@v0 with: From 58bf60a3cc41037537837c2e53ce69da059a4e47 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 13:35:48 +0900 Subject: [PATCH 07/19] refactor: remove Node.js setup and npm install steps from Firebase Hosting workflow --- .github/workflows/firebase-hosting-pull-request.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 23a978ed..2c08c489 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -13,10 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v2 - with: - node-version: '14' - - run: npm ci - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: ${{ secrets.GITHUB_TOKEN }} From 1f375d5e36361627fb8ef8db8e216d2ede4acab4 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 13:40:35 +0900 Subject: [PATCH 08/19] feat: add npm ci step for widgetbook directory in Firebase Hosting workflow --- .github/workflows/firebase-hosting-pull-request.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 2c08c489..eca88b63 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -13,6 +13,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - run: npm ci + working-directory: ./widgetbook - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: ${{ secrets.GITHUB_TOKEN }} From e4df775cd217f8256aa20c33ab3c1d85f6c67ddb Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 13:49:41 +0900 Subject: [PATCH 09/19] fix: update Firebase Hosting workflow to set entry point for widgetbook directory --- .github/workflows/firebase-hosting-pull-request.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index eca88b63..065fa4e7 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -13,10 +13,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: npm ci - working-directory: ./widgetbook - uses: FirebaseExtended/action-hosting-deploy@v0 with: + entryPoint: ./widgetbook repoToken: ${{ secrets.GITHUB_TOKEN }} firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ON_TIME_FRONT_WIDGETBOOK }} projectId: on-time-front-widgetbook From caff2ec881c307dd726ec414020d4eed90076b15 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 13:53:09 +0900 Subject: [PATCH 10/19] feat: update Firebase Hosting workflow to include Flutter build steps and set working directory --- .../firebase-hosting-pull-request.yml | 43 +++++++++++++------ 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 065fa4e7..33bb7e90 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -2,22 +2,39 @@ # https://github.com/firebase/firebase-tools name: Deploy to Firebase Hosting on PR -on: pull_request -permissions: - checks: write - contents: read - pull-requests: write +'on': pull_request jobs: build_and_preview: - if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' runs-on: ubuntu-latest + env: + working-directory: ./widgetbook steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v1 + with: + java-version: "12.x" + - uses: subosito/flutter-action@v2 + with: + flutter-version: "3.16.5" + channel: "stable" + + - run: flutter pub get + working-directory: ${{ env.working-directory }} + + - run: dart run build_runner build + working-directory: ${{ env.working-directory }} + - run: dart run slang + working-directory: ${{ env.working-directory }} + # - run: flutter test + # working-directory: ${{ env.working-directory }} + + - run: flutter build web -t lib/main/main_qa.dart + working-directory: ${{ env.working-directory }} + - uses: FirebaseExtended/action-hosting-deploy@v0 with: - entryPoint: ./widgetbook - repoToken: ${{ secrets.GITHUB_TOKEN }} - firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ON_TIME_FRONT_WIDGETBOOK }} - projectId: on-time-front-widgetbook - env: - FIREBASE_CLI_EXPERIMENTS: webframeworks + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ON_TIME_FRONT_WIDGETBOOK }}' + projectId: taskweaver-front + entryPoint: ${{ env.working-directory }} \ No newline at end of file From 5d0fd1554e94f60f29030e52b0a34627d7ad14f7 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 13:56:35 +0900 Subject: [PATCH 11/19] feat: update Flutter version to 3.27.1 in Firebase Hosting workflow --- .github/workflows/firebase-hosting-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 33bb7e90..734aaf8a 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -16,7 +16,7 @@ jobs: java-version: "12.x" - uses: subosito/flutter-action@v2 with: - flutter-version: "3.16.5" + flutter-version: "3.27.1" channel: "stable" - run: flutter pub get From 4dafc9d35d879015aba7b333de84c9906e8be55a Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 14:00:43 +0900 Subject: [PATCH 12/19] refactor: remove unused dart run commands from Firebase Hosting workflow --- .github/workflows/firebase-hosting-pull-request.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 734aaf8a..27a2c672 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -24,10 +24,6 @@ jobs: - run: dart run build_runner build working-directory: ${{ env.working-directory }} - - run: dart run slang - working-directory: ${{ env.working-directory }} - # - run: flutter test - # working-directory: ${{ env.working-directory }} - run: flutter build web -t lib/main/main_qa.dart working-directory: ${{ env.working-directory }} From 074e18524416ad5d66a55b1cbc8eecdbbb580bd2 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 14:06:55 +0900 Subject: [PATCH 13/19] feat: add flutter version check step in Firebase Hosting workflow --- .github/workflows/firebase-hosting-pull-request.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 27a2c672..a610e21a 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -18,6 +18,8 @@ jobs: with: flutter-version: "3.27.1" channel: "stable" + + - run: flutter --version - run: flutter pub get working-directory: ${{ env.working-directory }} From 039ba625e30177b152312ea31f74148cd14b2640 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 14:09:10 +0900 Subject: [PATCH 14/19] fix: simplify Flutter build command in Firebase Hosting workflow --- .github/workflows/firebase-hosting-pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index a610e21a..972a79df 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -18,7 +18,7 @@ jobs: with: flutter-version: "3.27.1" channel: "stable" - + - run: flutter --version - run: flutter pub get @@ -27,7 +27,7 @@ jobs: - run: dart run build_runner build working-directory: ${{ env.working-directory }} - - run: flutter build web -t lib/main/main_qa.dart + - run: flutter build web working-directory: ${{ env.working-directory }} - uses: FirebaseExtended/action-hosting-deploy@v0 From 67fbcfec204e722bd407a9093f14669de90be672 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 14:14:59 +0900 Subject: [PATCH 15/19] fix: update project ID in Firebase Hosting workflow configuration --- .github/workflows/firebase-hosting-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 972a79df..7f4a1acf 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -34,5 +34,5 @@ jobs: with: repoToken: '${{ secrets.GITHUB_TOKEN }}' firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ON_TIME_FRONT_WIDGETBOOK }}' - projectId: taskweaver-front + projectId: on-time-front-widgetbook entryPoint: ${{ env.working-directory }} \ No newline at end of file From 33260cd1c8efd90e27441e767d742c79444d945e Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 14:23:58 +0900 Subject: [PATCH 16/19] feat: update permissions in Firebase Hosting workflow for pull requests --- .github/workflows/firebase-hosting-pull-request.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 7f4a1acf..2ae11a2d 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -3,6 +3,10 @@ name: Deploy to Firebase Hosting on PR 'on': pull_request +permissions: + checks: write + contents: read + pull-requests: write jobs: build_and_preview: if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' From d220adbf452dd1a6747d7f3ae04e23e05daa100e Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 14:30:47 +0900 Subject: [PATCH 17/19] feat: add Firebase Hosting deployment workflow for main branch merges --- .github/workflows/firebase_hosting_merge.yml | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/firebase_hosting_merge.yml diff --git a/.github/workflows/firebase_hosting_merge.yml b/.github/workflows/firebase_hosting_merge.yml new file mode 100644 index 00000000..67472b60 --- /dev/null +++ b/.github/workflows/firebase_hosting_merge.yml @@ -0,0 +1,42 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on merge +'on': + push: + branches: + - main +jobs: + build_and_deploy: + runs-on: ubuntu-latest + env: + working-directory: ./widgetbook + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v1 + with: + java-version: "12.x" + - uses: subosito/flutter-action@v2 + with: + flutter-version: "3.27.1" + channel: "stable" + - run: flutter pub get + working-directory: ${{ env.working-directory }} + + - run: dart run build_runner build + working-directory: ${{ env.working-directory }} + + - run: flutter test + working-directory: ${{ env.working-directory }} + + - run: flutter build web + working-directory: ${{ env.working-directory }} + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ON_TIME_FRONT_WIDGETBOOK }}' + channelId: live + projectId: on-time-front-widgetbook + entryPoint: ${{ env.working-directory }} + env: + FIREBASE_CLI_EXPERIMENTS: webframeworks \ No newline at end of file From ad49065d3012bd88cd41dd0b40600a5c8e43a714 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 14:34:12 +0900 Subject: [PATCH 18/19] fix: update Firebase Hosting workflows to include FIREBASE_CLI_EXPERIMENTS environment variable --- .github/workflows/firebase-hosting-pull-request.yml | 4 +++- .github/workflows/firebase_hosting_merge.yml | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 2ae11a2d..226afd02 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -39,4 +39,6 @@ jobs: repoToken: '${{ secrets.GITHUB_TOKEN }}' firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ON_TIME_FRONT_WIDGETBOOK }}' projectId: on-time-front-widgetbook - entryPoint: ${{ env.working-directory }} \ No newline at end of file + entryPoint: ${{ env.working-directory }} + env: + FIREBASE_CLI_EXPERIMENTS: webframeworks \ No newline at end of file diff --git a/.github/workflows/firebase_hosting_merge.yml b/.github/workflows/firebase_hosting_merge.yml index 67472b60..df1a5874 100644 --- a/.github/workflows/firebase_hosting_merge.yml +++ b/.github/workflows/firebase_hosting_merge.yml @@ -37,6 +37,4 @@ jobs: firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ON_TIME_FRONT_WIDGETBOOK }}' channelId: live projectId: on-time-front-widgetbook - entryPoint: ${{ env.working-directory }} - env: - FIREBASE_CLI_EXPERIMENTS: webframeworks \ No newline at end of file + entryPoint: ${{ env.working-directory }} \ No newline at end of file From dfb99069bf661b0b9d9914fcf60e511754a8e747 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Sun, 19 Jan 2025 14:39:19 +0900 Subject: [PATCH 19/19] feat: update Firebase Hosting workflow to set permissions and include FIREBASE_CLI_EXPERIMENTS environment variable --- .github/workflows/firebase_hosting_merge.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/firebase_hosting_merge.yml b/.github/workflows/firebase_hosting_merge.yml index df1a5874..9a3fdd5b 100644 --- a/.github/workflows/firebase_hosting_merge.yml +++ b/.github/workflows/firebase_hosting_merge.yml @@ -6,6 +6,10 @@ name: Deploy to Firebase Hosting on merge push: branches: - main +permissions: + checks: write + contents: read + pull-requests: write jobs: build_and_deploy: runs-on: ubuntu-latest @@ -37,4 +41,6 @@ jobs: firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ON_TIME_FRONT_WIDGETBOOK }}' channelId: live projectId: on-time-front-widgetbook - entryPoint: ${{ env.working-directory }} \ No newline at end of file + entryPoint: ${{ env.working-directory }} + env: + FIREBASE_CLI_EXPERIMENTS: webframeworks \ No newline at end of file