Skip to content

Commit

Permalink
fix: CI & default env value
Browse files Browse the repository at this point in the history
  • Loading branch information
vareversat committed Jun 25, 2023
1 parent 71ebc2c commit 5f4e954
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ jobs:
with:
flutter_version: '3.10.0'
android_output: 'apk'
env: 'dev'
secrets:
passphrase: ${{ secrets.PASSPHRASE }}
passphrase: ${{ secrets.PASSPHRASE }}
3 changes: 2 additions & 1 deletion .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
with:
flutter_version: '3.10.0'
android_output: 'aab'
env: 'dev'
secrets:
passphrase: ${{ secrets.PASSPHRASE }}
fastlane-dry-run:
Expand All @@ -28,4 +29,4 @@ jobs:
with:
lane: 'dry_run'
secrets:
passphrase: ${{ secrets.PASSPHRASE }}
passphrase: ${{ secrets.PASSPHRASE }}
4 changes: 4 additions & 0 deletions .github/workflows/flutter.build.action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
description: 'Android build file type output (apk or abb)'
required: true
type: string
env:
description: 'Environment in which the application will be build'
required: true
type: string
secrets:
passphrase:
description: 'The passphrase to decrypt the configuration'
Expand Down
1 change: 1 addition & 0 deletions lib/const.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,5 @@ class Const {
static const String specialWineFestivalBoatsEvent = 'Bateaux fete du vin';
static const String sentryDSNEnvKey = 'SENTRY_DSN';
static const String envKey = 'ENV';
static const String defaultEnv = 'dev';
}
3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ void main() async {
.toLowerCase();

/// Fetch running env
const env = String.fromEnvironment(Const.envKey, defaultValue: 'dev');
const env =
String.fromEnvironment(Const.envKey, defaultValue: Const.defaultEnv);

developer.log(
'##### HI ! Starting $formattedRelease in $env mode #####',
Expand Down

0 comments on commit 5f4e954

Please sign in to comment.