|
6 | 6 | build:
|
7 | 7 | runs-on: ubuntu-latest
|
8 | 8 | steps:
|
9 |
| - - uses: actions/setup-java@v2 |
10 |
| - with: |
11 |
| - distribution: 'zulu' |
12 |
| - java-version: '17' |
13 |
| - - uses: subosito/flutter-action@v2 |
14 |
| - with: |
15 |
| - channel: stable |
16 |
| - flutter-version: 3.19.5 |
17 |
| - - uses: actions-rs/toolchain@v1 |
18 |
| - with: |
19 |
| - toolchain: nightly |
20 |
| - - uses: actions/checkout@v3 |
21 |
| - - name: Setup Rust tools for Android build |
22 |
| - run: | |
23 |
| - rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android |
24 |
| - cargo install cargo-ndk |
25 |
| - - name: Build for Android |
26 |
| - env: |
27 |
| - SDK_REGISTRY_TOKEN: ${{ secrets.MAP_SDK_SECRET_KEY }} |
28 |
| - MAP_SDK_PUBLIC_KEY: ${{ secrets.MAP_SDK_PUBLIC_KEY }} |
29 |
| - run: | |
30 |
| - flutter pub get |
31 |
| - flutter build apk --release --dart-define=MAP_SDK_PUBLIC_KEY="$MAP_SDK_PUBLIC_KEY" |
32 |
| - - name: Upload Android Artifacts |
33 |
| - uses: actions/upload-artifact@v3 |
34 |
| - with: |
35 |
| - name: android |
36 |
| - path: ./build/app/outputs/flutter-apk/app-release.apk |
37 |
| - - name: Setup Rust tools for Web build |
38 |
| - run: | |
39 |
| - rustup override set nightly |
40 |
| - rustup component add rust-src |
41 |
| - rustup target add wasm32-unknown-unknown |
42 |
| - cargo install wasm-pack |
43 |
| - - name: Build for Web |
44 |
| - env: |
45 |
| - RUSTUP_TOOLCHAIN: nightly |
46 |
| - RUSTFLAGS: -C target-feature=+atomics,+bulk-memory,+mutable-globals |
47 |
| - SDK_REGISTRY_TOKEN: ${{ secrets.MAP_SDK_SECRET_KEY }} |
48 |
| - MAP_SDK_PUBLIC_KEY: ${{ secrets.MAP_SDK_PUBLIC_KEY }} |
49 |
| - run: | |
50 |
| - wasm-pack build -t no-modules -d ./../web/pkg --no-typescript --out-name native native -- -Z build-std=std,panic_abort |
51 |
| - flutter build web --release --web-renderer html --dart-define=MAP_SDK_PUBLIC_KEY="$MAP_SDK_PUBLIC_KEY" |
52 |
| - - name: Upload Web Artifacts |
53 |
| - uses: actions/upload-artifact@v3 |
54 |
| - with: |
55 |
| - name: web |
56 |
| - path: ./build/web |
57 |
| - - name: Publish to Cloudflare Pages |
58 |
| - uses: cloudflare/pages-action@1 |
59 |
| - with: |
60 |
| - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
61 |
| - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |
62 |
| - projectName: openhaystack |
63 |
| - directory: ./build/web |
64 |
| - |
| 9 | + - uses: actions/setup-java@v2 |
| 10 | + with: |
| 11 | + distribution: "zulu" |
| 12 | + java-version: "17" |
| 13 | + - uses: subosito/flutter-action@v2 |
| 14 | + with: |
| 15 | + channel: stable |
| 16 | + flutter-version: 3.19.5 |
| 17 | + - uses: actions-rs/toolchain@v1 |
| 18 | + with: |
| 19 | + toolchain: nightly |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + - name: Setup Rust tools for Android build |
| 22 | + run: | |
| 23 | + rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android |
| 24 | + cargo install cargo-ndk |
| 25 | + - name: Build for Android |
| 26 | + env: |
| 27 | + SDK_REGISTRY_TOKEN: ${{ secrets.MAP_SDK_SECRET_KEY }} |
| 28 | + MAP_SDK_PUBLIC_KEY: ${{ secrets.MAP_SDK_PUBLIC_KEY }} |
| 29 | + run: | |
| 30 | + flutter pub get |
| 31 | + flutter build apk --release --dart-define=MAP_SDK_PUBLIC_KEY="$MAP_SDK_PUBLIC_KEY" |
| 32 | + - name: Upload Android Artifacts |
| 33 | + uses: actions/upload-artifact@v3 |
| 34 | + with: |
| 35 | + name: android |
| 36 | + path: ./build/app/outputs/flutter-apk/app-release.apk |
| 37 | + - name: Setup Rust tools for Web build |
| 38 | + run: | |
| 39 | + rustup override set nightly |
| 40 | + rustup component add rust-src |
| 41 | + rustup target add wasm32-unknown-unknown |
| 42 | + cargo install wasm-pack |
| 43 | + - name: Build for Web |
| 44 | + env: |
| 45 | + RUSTUP_TOOLCHAIN: nightly |
| 46 | + RUSTFLAGS: -C target-feature=+atomics,+bulk-memory,+mutable-globals |
| 47 | + SDK_REGISTRY_TOKEN: ${{ secrets.MAP_SDK_SECRET_KEY }} |
| 48 | + MAP_SDK_PUBLIC_KEY: ${{ secrets.MAP_SDK_PUBLIC_KEY }} |
| 49 | + run: | |
| 50 | + wasm-pack build -t no-modules -d ./../web/pkg --no-typescript --out-name native native -- -Z build-std=std,panic_abort |
| 51 | + flutter build web --release --web-renderer html --dart-define=MAP_SDK_PUBLIC_KEY="$MAP_SDK_PUBLIC_KEY" |
| 52 | + - name: Upload Web Artifacts |
| 53 | + uses: actions/upload-artifact@v4 |
| 54 | + with: |
| 55 | + name: web |
| 56 | + path: ./build/web |
| 57 | + - name: Publish to Cloudflare Pages |
| 58 | + uses: cloudflare/pages-action@1 |
| 59 | + with: |
| 60 | + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
| 61 | + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |
| 62 | + projectName: openhaystack |
| 63 | + directory: ./build/web |
0 commit comments