Skip to content

Commit

Permalink
fix: make share url dependent on environment (#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsgalarraga authored May 29, 2024
1 parent 14e6ba3 commit f27e14f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy_app_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- main

env:
CROSSWORD_URL: https://e7b2896c65fabc0480edc6c0e.web.app

jobs:
deploy-dev:
runs-on: ubuntu-latest
Expand All @@ -16,7 +19,7 @@ jobs:
channel: master
flutter-version: 3.22.0-41.0.pre
- run: flutter packages get
- run: flutter build web -t lib/main_development.dart --dart-define RECAPTCHA_KEY=${{ secrets.RECAPTCHA_KEY }} --wasm
- run: flutter build web -t lib/main_development.dart --dart-define CROSSWORD_URL=${{ env.CROSSWORD_URL }} --dart-define RECAPTCHA_KEY=${{ secrets.RECAPTCHA_KEY }} --wasm


- uses: FirebaseExtended/action-hosting-deploy@v0
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/deploy_app_prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: deploy_app_prod

on: workflow_dispatch

env:
CROSSWORD_URL: https://crossword.withgoogle.com

jobs:
deploy-dev:
runs-on: ubuntu-latest
Expand All @@ -12,7 +15,7 @@ jobs:
with:
channel: "stable"
- run: flutter packages get
- run: flutter build web -t lib/main_production.dart --dart-define RECAPTCHA_KEY=${{ secrets.RECAPTCHA_KEY_PROD }} --wasm
- run: flutter build web -t lib/main_production.dart --dart-define CROSSWORD_URL=${{ env.CROSSWORD_URL }} --dart-define RECAPTCHA_KEY=${{ secrets.RECAPTCHA_KEY_PROD }} --wasm


- uses: FirebaseExtended/action-hosting-deploy@v0
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/deploy_app_staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: deploy_app_staging

on: workflow_dispatch

env:
CROSSWORD_URL: https://stg-e7b2896c65fabc0480edc6c0e.web.app

jobs:
deploy-dev:
runs-on: ubuntu-latest
Expand All @@ -13,7 +16,7 @@ jobs:
channel: master
flutter-version: 3.22.0-41.0.pre
- run: flutter packages get
- run: flutter build web -t lib/main_staging.dart --dart-define RECAPTCHA_KEY=${{ secrets.RECAPTCHA_KEY }} --wasm
- run: flutter build web -t lib/main_staging.dart --dart-define CROSSWORD_URL=${{ env.CROSSWORD_URL }} --dart-define RECAPTCHA_KEY=${{ secrets.RECAPTCHA_KEY }} --wasm


- uses: FirebaseExtended/action-hosting-deploy@v0
Expand Down
5 changes: 4 additions & 1 deletion lib/project_details/link/project_details_links.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ class ProjectDetailsLinks {
static const claimBadge =
'https://developers.google.com/profile/badges/events/io/2024/crossword';
static const googleAI = 'https://ai.google.dev/';
static const crossword = 'https://e7b2896c65fabc0480edc6c0e.web.app';
static const crossword = String.fromEnvironment(
'CROSSWORD_URL',
defaultValue: 'https://crossword.withgoogle.com',
);
static const blogPost = 'https://flutter.dev/crossword';
}

0 comments on commit f27e14f

Please sign in to comment.