webview only support android and ios,other use lunchUrl #125
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
android: | |
name: Android | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Decrypt large secret | |
run: chmod +x ./.github/scripts/decrypt_secret.sh&&./.github/scripts/decrypt_secret.sh | |
env: | |
LARGE_SECRET_PASSPHRASE: ${{ secrets.GPG_LARGE_SECRET_PASSPHRASE }} | |
# - uses: actions/setup-java@v3 | |
# with: | |
# distribution: 'temurin' | |
# java-version: '17' | |
- name: Set up Dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- run: flutter pub upgrade | |
- run: flutter pub get | |
# - run: flutter build apk --profile | |
# - run: flutter build apk --debug | |
- run: flutter build apk --release | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: app-release-all.apk | |
path: ./build/app/outputs/flutter-apk/app-release.apk | |
# - run: flutter build apk --release --split-per-abi | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: app-arm64-v8a-release.apk | |
# path: ./build/app/outputs/flutter-apk/app-arm64-v8a-release.apk | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: app-x86_64-release.apk | |
# path: ./build/app/outputs/flutter-apk/app-x86_64-release.apk | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: app-armeabi-v7a-release.apk | |
# path: ./build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk | |
ios: | |
name: iOS | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- run: flutter config --no-enable-android | |
- run: flutter pub get | |
- run: flutter build ipa --release --no-codesign | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Runner.xcarchive | |
path: ./build/ios/archive/Runner.xcarchive | |
linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
env: | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Install required build tools for linux | |
run: sudo apt-get update && sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev | |
- name: Build linux release | |
run: | | |
flutter config --enable-linux-desktop | |
flutter config --no-enable-android | |
flutter pub get | |
flutter build linux --release | |
# - name: Install snapcraft | |
# run: | | |
# sudo snap install snapcraft --classic | |
# - name: Run hash -r | |
# run: hash -r | |
# - name: Setup LXD | |
# uses: canonical/setup-lxd@v0.1.1 | |
# with: | |
# channel: latest/stable | |
# - name: run snapcraft | |
# run: | | |
# snapcraft --use-lxd | |
# | |
macos: | |
name: MacOS | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- run: flutter config --enable-macos-desktop | |
- run: flutter config --no-enable-android | |
- run: flutter pub get | |
- run: flutter build macos --release | |
# - run: cd build/macos/Build/Products/Release | |
# - run: ditto -c -k --sequesterRsrc --keepParent openiothub.app macos-release.zip | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: macos-release.zip | |
# path: ./build/macOS/Build/Products/Release/macos-release.zip | |
# | |
windows: | |
name: Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- run: flutter config --enable-windows-desktop | |
- run: flutter config --no-enable-android | |
- run: flutter pub get | |
- run: flutter build windows --release | |
# - run: cd build\windows\runner | |
# - run: Compress-Archive -Path Release -DestinationPath windows-release.zip | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: macos-release.zip | |
# path: ./build/windows/runner/windows-release.zip |