Skip to content

chore: update upload action to v4 (#49) #62

chore: update upload action to v4 (#49)

chore: update upload action to v4 (#49) #62

name: build-android-apk
on:
push:
branches:
- master
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.1'
channel: 'stable'
- run: pushd example; flutter pub get
- run: pushd example; flutter build apk --dart-define=IS_INTERNAL_JSON_BUILD=true --release
- name: Archive APK
uses: actions/upload-artifact@v4
with:
name: apk-app-release
path: example/build/app/outputs/flutter-apk/app-release.apk
- name: Upload app to browserstack
run: |
curl \
-u ${{ secrets.ARGYLE_MOBILE_RUN_BS_USER }}:${{ secrets.ARGYLE_MOBILE_RUN_BS_KEY }} \
-X POST "https://api-cloud.browserstack.com/app-automate/upload" \
-F "file=@example/build/app/outputs/flutter-apk/app-release.apk" \
-F 'data={"custom_id": "android_flutter_latest"}'