name: Build (Linux, Mac OS, Windows) on: push: branches: [main] pull_request: branches: [main] jobs: build-linux: name: "Build Linux" runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v4.3.4 - name: Setup Flutter SDK uses: subosito/flutter-action@v1.5.3 with: channel: "stable" flutter-version: "3.0.5" - name: Install Linux build tools run: sudo apt-get update && sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev - name: Enable desktop run: flutter config --enable-linux-desktop - name: Get packages run: flutter pub get - name: Analyze run: flutter analyze - name: Flutter build app run: flutter build linux build-macos: name: "Build MacOS" runs-on: macos-latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v4.3.4 - name: Setup Flutter SDK uses: subosito/flutter-action@v1.5.3 with: channel: "stable" flutter-version: "3.0.5" - name: Set Up XCode uses: devbotsxyz/xcode-select@v1.1.0 - name: Enable desktop run: flutter config --enable-macos-desktop - name: Get packages run: flutter pub get - name: Analyze run: flutter analyze - name: Flutter build app run: flutter build macos build-windows: name: "Build Windows" runs-on: windows-latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v4.3.4 - name: Setup Flutter SDK uses: subosito/flutter-action@v1.5.3 with: channel: "stable" flutter-version: "3.0.5" - name: Enable desktop run: flutter config --enable-windows-desktop - name: Get packages run: flutter pub get - name: Analyze run: flutter analyze - name: Flutter build app run: flutter build windows # build_windows: # name: Build Flutter (Windows) # needs: [flutter_test] # runs-on: ubuntu-latest # steps: # - uses: actions/checkout@v4 # - uses: actions/setup-java@v1 # with: # java-version: "12.x" # - uses: subosito/flutter-action@v1 # with: # channel: "stable" # - run: flutter pub get # - run: flutter clean # - run: flutter build windows # - run: flutter pub run msix:create # - name: Upload msix # uses: actions/upload-artifact@v2 # with: # name: app # path: build/windows/runner/Release/shodana_reader.msix