Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
wangwillian0 committed May 26, 2023
1 parent 4eb1716 commit 0cbbf10
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ jobs:
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android
cargo install cargo-ndk
- name: Build for Android
env:
SDK_REGISTRY_TOKEN: ${{ secrets.MAP_SDK_SECRET_KEY }}
MAP_SDK_PUBLIC_KEY: ${{ secrets.MAP_SDK_PUBLIC_KEY }}
run: |
flutter pub get
flutter build apk --release
flutter build apk --release --dart-define=MAP_SDK_PUBLIC_KEY="$MAP_SDK_PUBLIC_KEY"
- name: Upload Android Artifacts
uses: actions/upload-artifact@v3
with:
Expand All @@ -35,11 +38,14 @@ jobs:
rustup target add wasm32-unknown-unknown
cargo install wasm-pack
- name: Build for Web
env:
RUSTUP_TOOLCHAIN: nightly
RUSTFLAGS: -C target-feature=+atomics,+bulk-memory,+mutable-globals
SDK_REGISTRY_TOKEN: ${{ secrets.MAP_SDK_SECRET_KEY }}
MAP_SDK_PUBLIC_KEY: ${{ secrets.MAP_SDK_PUBLIC_KEY }}
run: |
export RUSTUP_TOOLCHAIN=nightly
export RUSTFLAGS="-C target-feature=+atomics,+bulk-memory,+mutable-globals"
wasm-pack build -t no-modules -d ./../web/pkg --no-typescript --out-name native native -- -Z build-std=std,panic_abort
flutter build web --release --web-renderer html
flutter build web --release --web-renderer html --dart-define=MAP_SDK_PUBLIC_KEY="$MAP_SDK_PUBLIC_KEY"
- name: Upload Web Artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion lib/history/accessory_history.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class _AccessoryHistoryState extends State<AccessoryHistory> {
flex: 3,
fit: FlexFit.tight,
child: MapboxMap(
accessToken: const String.fromEnvironment("SDK_REGISTRY_TOKEN"),
accessToken: const String.fromEnvironment("MAP_SDK_PUBLIC_KEY"),
onMapCreated: _onMapCreated,
onStyleLoadedCallback: _onStyleLoaded,
initialCameraPosition: const CameraPosition(
Expand Down
2 changes: 1 addition & 1 deletion lib/map/map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class _AccessoryMapState extends State<AccessoryMap> {
}

return MapboxMap(
accessToken: const String.fromEnvironment("SDK_REGISTRY_TOKEN"),
accessToken: const String.fromEnvironment("MAP_SDK_PUBLIC_KEY"),
onMapCreated: onMapCreated,
onStyleLoadedCallback: onStyleLoaded,
initialCameraPosition: CameraPosition(
Expand Down

0 comments on commit 0cbbf10

Please sign in to comment.