Workflow file for this run
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: Build and Release APK | |
on: | |
release: | |
types: [published] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare NDK dir for caching ( workaround for https://github.com/actions/virtual-environments/issues/1337 ) | |
run: | | |
sudo mkdir -p /usr/local/lib/android/sdk/ndk | |
sudo chmod -R 777 /usr/local/lib/android/sdk/ndk | |
sudo chown -R $USER:$USER /usr/local/lib/android/sdk/ndk | |
- name: install NDK | |
uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: r25b | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 11 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: "3.7.12" | |
channel: 'stable' | |
- name: Get dependencies | |
working-directory: ostorlab_insecure_flutter_app | |
run: flutter pub get | |
- name: Start AAR build | |
working-directory: ostorlab_insecure_flutter_app | |
run: flutter build aar --no-sound-null-safety | |
- name: Build Android app | |
uses: gradle/[email protected] | |
with: | |
arguments: assembleDebug | |
gradle-version: 7.3.3 | |
- name: Move to release | |
run: | | |
cp ./app/build/outputs/apk/debug/app-debug.apk ostorlab_insecure_app.apk | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
./ostorlab_insecure_app.apk | |
- name: Launch Ostorlab Full Scan with just Login Credentials | |
uses: Ostorlab/[email protected] | |
with: | |
scan_profile: full_scan | |
asset_type: android-apk | |
target: ./ostorlab_insecure_app.apk | |
scan_title: Scan App | |
ostorlab_api_key: ${{ secrets.OSTORLAB_API_KEY }} | |
extra: --test-credentials-name "phone number" --test-credentials-value 2312132 --test-credentials-name "pin" --test-credentials-value 213212 |