Skip to content

Commit ef136ef

Browse files
committed
testting env variables
1 parent a1ce2c6 commit ef136ef

2 files changed

Lines changed: 26 additions & 24 deletions

File tree

.github/workflows/build_windows.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,31 @@ jobs:
1212

1313
- name: Create .env file
1414
run: |
15-
echo SUPABASE_URL="${{ env.SUPABASE_URL }}" > .env
16-
echo SUPABASE_KEY="${{ env.SUPABASE_KEY }}" >> .env
17-
type .env # For debugging, shows the file contents in logs
15+
echo "SUPABASE_URL=${{ vars.SUPABASE_URL }}" > .env
16+
echo "SUPABASE_KEY=${{ vars.SUPABASE_KEY }}" >> .env
17+
type vars # For debugging, shows the file contents in logs
1818
19-
- name: Setup Flutter
20-
uses: subosito/flutter-action@v2
21-
with:
22-
channel: stable
23-
cache: true
19+
# - name: Setup Flutter
20+
# uses: subosito/flutter-action@v2
21+
# with:
22+
# channel: stable
23+
# cache: true
2424

25-
- name: Install dependencies
26-
run: flutter pub get
25+
# - name: Install dependencies
26+
# run: flutter pub get
2727

28-
- name: Build Windows EXE
29-
run: flutter build windows --release
28+
# - name: Build Windows EXE
29+
# run: flutter build windows --release
3030

31-
- name: Activate Fastforge
32-
run: dart pub global activate fastforge
31+
# - name: Activate Fastforge
32+
# run: dart pub global activate fastforge
3333

34-
- name: Package using Fastforge
35-
run: fastforge package --platform windows --targets exe
34+
# - name: Package using Fastforge
35+
# run: fastforge package --platform windows --targets exe
3636

37-
- name: Upload Artifact
38-
uses: actions/upload-artifact@v4
39-
with:
40-
name: WindowsExecutable
41-
path: dist/0.1.0/cookethflow-0.1.0-windows-setup.exe
42-
retention-days: 7 # Optional: Set artifact retention period
37+
# - name: Upload Artifact
38+
# uses: actions/upload-artifact@v4
39+
# with:
40+
# name: WindowsExecutable
41+
# path: dist/0.1.0/cookethflow-0.1.0-windows-setup.exe
42+
# retention-days: 7

lib/main.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import 'dart:io';
2+
13
import 'package:cookethflow/core/services/supabase_service.dart';
24
import 'package:cookethflow/providers/dashboard_provider.dart';
35
import 'package:cookethflow/providers/flowmanage_provider.dart';
@@ -13,8 +15,8 @@ import 'package:supabase_flutter/supabase_flutter.dart';
1315
Future<void> main() async {
1416
WidgetsFlutterBinding.ensureInitialized();
1517
await dotenv.load(fileName: '.env');
16-
String supabaseUrl = dotenv.env["SUPABASE_URL"] ?? "Url";
17-
String supabaseApiKey = dotenv.env["SUPABASE_KEY"] ?? "your_api_key";
18+
String supabaseUrl = dotenv.env["SUPABASE_URL"] ?? Platform.environment["SUPABASE_URL"] ?? "Url";
19+
String supabaseApiKey = dotenv.env["SUPABASE_KEY"] ?? Platform.environment["SUPABASE_KEY"] ?? "your_api_key";
1820

1921
final instance = await Supabase.initialize(
2022
url: supabaseUrl,

0 commit comments

Comments
 (0)