Skip to content

Merge pull request #19 from Simple-OTP/dependabot/pub/test-1.25.2 #32

Merge pull request #19 from Simple-OTP/dependabot/pub/test-1.25.2

Merge pull request #19 from Simple-OTP/dependabot/pub/test-1.25.2 #32

name: SimpleOTP Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
# This job will run on ubuntu virtual machine
runs-on: ubuntu-latest
steps:
# Setup Java environment in order to build the Android app.
- uses: actions/checkout@v4
# Setup java environment
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '17'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
# Setup the flutter environment.
- uses: subosito/flutter-action@v2
with:
channel: 'stable' # 'beta', 'dev', 'alpha', default to: 'stable'
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev cmake clang pkg-config
- name: Disable Flutter analytics
run: flutter --disable-analytics
- name: Getting dependencies
run: flutter pub get
# Statically analyze the Dart code for any errors.
- name: Analyzing
run: flutter analyze .
# Run widget tests for our flutter project.
- name: Testing
run: flutter test
- name: Linux build
run: flutter build linux
- name: Android debug build
run: flutter build apk --debug --split-per-abi
# flutter build appbundle --release --build-number=$BUILD_NUMBER
# Build apk.
# - run: flutter build apk
# Upload generated apk to the artifacts.
# - uses: actions/upload-artifact@v1
# with:
# name: release-apk
# path: build/app/outputs/apk/release/app-release.apk