Skip to content

Commit

Permalink
ci: update env settting
Browse files Browse the repository at this point in the history
  • Loading branch information
shiki-tak committed Jul 18, 2024
1 parent 10cf54d commit 14a165c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
with:
flutter-version: '3.22.2'

- name: Make .env
- name: Make env
working-directory: flutter_bird_app
run: |
touch .env
echo WALLET_CONNECT_PROJECT_ID=${{secrets.WALLET_CONNECT_PROJECT_ID}} >> .env
touch env
echo WALLET_CONNECT_PROJECT_ID=${{secrets.WALLET_CONNECT_PROJECT_ID}} >> env
- name: Show version
working-directory: flutter_bird_app
Expand All @@ -37,7 +37,10 @@ jobs:

- name: Build
working-directory: flutter_bird_app
run: flutter build web
run: |
flutter build web
mkdir -p build/web/assets
cp env build/web/assets
- name: Set GitHub Deployment Environment
id: github_deployment_environment
Expand Down
10 changes: 8 additions & 2 deletions flutter_bird_app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ import 'package:flutter_line_liff/flutter_line_liff.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();
await dotenv.load(fileName: ".env");
print("Starting app initialization");

try {
await dotenv.load(fileName: "env");
} catch(e, stackTrace) {
print("Error loading env: $e");
print("Stack trace: $stackTrace");
}

print("Starting application...");
final bool isInClient = FlutterLineLiff().isInClient;
runApp(MyApp(isInClient: isInClient));
}
Expand Down
2 changes: 1 addition & 1 deletion flutter_bird_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ flutter:
assets:
- images/
- assets/
- .env
- env
fonts:
- family: flappy
fonts:
Expand Down

0 comments on commit 14a165c

Please sign in to comment.