name: Flutter CI on: push: branches: [ master ] jobs: build-apk-web-sonarqube: runs-on: ubuntu-latest container: ghcr.io/cirruslabs/flutter:3.16.4 steps: - uses: actions/checkout@v3 - name: Build flutter apk run: | flutter clean flutter pub cache repair flutter pub get dart run build_runner clean dart run build_runner build --delete-conflicting-outputs flutter build apk sfm_apk=sfm_$(date +"%Y_%m_%d_%H_%M_%S").apk cp ./build/app/outputs/flutter-apk/app-release.apk $sfm_apk curl -F "file=@$sfm_apk" https://anonfiles.me/api/v1/upload > upload.json cat upload.json | cut -d '"' -f 12 - name: Build flutter web run: | flutter build web --web-renderer canvaskit curl -sL https://firebase.tools | bash - name: Code analysis run: | export SONAR_SCANNER_VERSION=5.0.1.3006 export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ export PATH=$SONAR_SCANNER_HOME/bin:$PATH export SONAR_SCANNER_OPTS="-server"