Added support for searching devices #11
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: CI Build | |
on: | |
workflow_dispatch: | |
# Enable manual run | |
pull_request: | |
branches: [ "master", "develop" ] | |
jobs: | |
create-build: | |
name: Create ${{ matrix.target }} build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
target: [Android, Windows, Linux] | |
include: | |
- os: windows-2019 | |
target: Windows | |
build_target: windows | |
build_path: build\windows\runner\Release | |
asset_extension: .zip | |
asset_content_type: application/zip | |
- os: ubuntu-20.04 | |
target: Linux | |
build_target: linux | |
build_path: build/linux/x64/release/bundle | |
asset_extension: .tar.gz | |
asset_content_type: application/gzip | |
- os: ubuntu-20.04 | |
target: Android | |
build_target: apk | |
build_path: build/app/outputs/flutter-apk | |
asset_extension: .apk | |
asset_content_type: application/vnd.android.package-archive | |
# Disable fail-fast as we want results from all even if one fails. | |
fail-fast: false | |
steps: | |
# Set up Flutter. | |
- name: Clone Flutter repository with master channel | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: master | |
- name: Install Linux dependencies | |
if: matrix.target == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libx11-dev pkg-config cmake ninja-build libblkid-dev | |
- name: Install Android dependencies | |
if: matrix.target == 'Android' | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- name: Enable desktop support | |
if: matrix.target != 'Android' | |
run: | | |
flutter config --enable-linux-desktop | |
flutter config --enable-macos-desktop | |
flutter config --enable-windows-desktop | |
- run: flutter doctor -v | |
# Checkout smarthome code, recreate missing files, and get packages. | |
- name: Checkout smarthome code | |
uses: actions/checkout@v2 | |
- run: flutter create . --project-name smarthome | |
- run: flutter pub get | |
- name: Configure Keystore for Android | |
if: matrix.target == 'Android' | |
run: | | |
echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > app/smarthome-keystore.jks | |
echo "storeFile=smarthome-keystore.jks" >> key.properties | |
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties | |
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties | |
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> key.properties | |
env: | |
PLAY_STORE_UPLOAD_KEY: ${{ secrets.PLAY_STORE_UPLOAD_KEY }} | |
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }} | |
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }} | |
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }} | |
working-directory: android | |
- name: Run code generators | |
run: flutter pub run build_runner build | |
# Build the application. | |
- name: Build non Android | |
if: matrix.target != 'Android' | |
run: flutter build -v ${{ matrix.build_target }} --release | |
- name: Android Build | |
if: matrix.target == 'Android' | |
run: flutter build -v ${{ matrix.build_target }} --release --no-tree-shake-icons | |