use flet.version.flutter_version #28
Workflow file for this run
This file contains hidden or 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: Flet Build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| paths-ignore: | |
| - '.github/dependabot.yml' | |
| - 'LICENSE' | |
| - 'README.md' | |
| pull_request: | |
| paths-ignore: | |
| - '.github/dependabot.yml' | |
| - 'LICENSE' | |
| - 'README.md' | |
| #concurrency: | |
| # PRs share a group (PR number) → newer PR runs cancel older ones. | |
| # Push/dispatch runs use unique run_id → nothing gets cancelled. | |
| # group: build-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }} | |
| # cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| UV_PYTHON: 3.12 | |
| PYTHONUTF8: 1 | |
| CMAKE_VERSION: 3.22.1 | |
| # https://docs.flet.dev/publish/#versioning | |
| BUILD_NUMBER: 1 | |
| BUILD_VERSION: 1.0.0 | |
| FLET_CLI_NO_RICH_OUTPUT: 1 | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Get Flutter version | |
| shell: bash | |
| run: | | |
| # uv venv | |
| FLUTTER_VERSION="$( uv run python -c 'import flet.version; print(flet.version.flutter_version)' )" | |
| echo "FLUTTER_VERSION=$FLUTTER_VERSION" >> "$GITHUB_ENV" | |
| echo "Flutter version: $FLUTTER_VERSION" | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| cache: true | |
| channel: stable | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| - name: Install Linux dependencies | |
| shell: bash | |
| run: | | |
| sudo apt update --allow-releaseinfo-change | |
| sudo apt-get install -y --no-install-recommends \ | |
| clang \ | |
| ninja-build \ | |
| libgtk-3-dev \ | |
| libasound2-dev \ | |
| libmpv-dev \ | |
| mpv \ | |
| libgstreamer1.0-dev \ | |
| libgstreamer-plugins-base1.0-dev \ | |
| libgstreamer-plugins-bad1.0-dev \ | |
| gstreamer1.0-plugins-base \ | |
| gstreamer1.0-plugins-good \ | |
| gstreamer1.0-plugins-bad \ | |
| gstreamer1.0-plugins-ugly \ | |
| gstreamer1.0-libav \ | |
| gstreamer1.0-tools \ | |
| gstreamer1.0-x \ | |
| gstreamer1.0-alsa \ | |
| gstreamer1.0-gl \ | |
| gstreamer1.0-gtk3 \ | |
| gstreamer1.0-qt5 \ | |
| gstreamer1.0-pulseaudio | |
| sudo apt-get clean | |
| - name: Flet Build Linux | |
| run: | | |
| uv run flet build linux --yes --verbose --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION | |
| - name: Upload Linux Artifact | |
| uses: actions/upload-artifact@v5.0.0 | |
| with: | |
| name: linux-build-artifact | |
| path: build/linux | |
| if-no-files-found: warn | |
| overwrite: false | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Get Flutter version | |
| shell: bash | |
| run: | | |
| # uv venv | |
| FLUTTER_VERSION="$( uv run python -c 'import flet.version; print(flet.version.flutter_version)' )" | |
| echo "FLUTTER_VERSION=$FLUTTER_VERSION" >> "$GITHUB_ENV" | |
| echo "Flutter version: $FLUTTER_VERSION" | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| cache: true | |
| channel: stable | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| - name: Flet Build macOS | |
| run: | | |
| uv run flet build macos --yes --verbose --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION | |
| - name: Upload macOS Artifact | |
| uses: actions/upload-artifact@v5.0.0 | |
| with: | |
| name: macos-build-artifact | |
| path: build/macos | |
| if-no-files-found: warn | |
| overwrite: false | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Get Flutter version | |
| shell: bash | |
| run: | | |
| # uv venv | |
| FLUTTER_VERSION="$( uv run python -c 'import flet.version; print(flet.version.flutter_version)' )" | |
| echo "FLUTTER_VERSION=$FLUTTER_VERSION" >> "$GITHUB_ENV" | |
| echo "Flutter version: $FLUTTER_VERSION" | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| cache: true | |
| channel: stable | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| - name: Flet Build Windows | |
| shell: bash | |
| run: | | |
| uv run flet build windows --yes --verbose --no-rich-output --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION | |
| - name: Upload Windows Artifact | |
| uses: actions/upload-artifact@v5.0.0 | |
| with: | |
| name: windows-build-artifact | |
| path: build/windows | |
| if-no-files-found: warn | |
| overwrite: false | |
| build-aab: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu, macos, windows ] | |
| runs-on: ${{ matrix.os }}-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup cmake | |
| uses: jwlawson/actions-setup-cmake@v2 | |
| with: | |
| cmake-version: ${{ env.CMAKE_VERSION }} | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Get Flutter version | |
| shell: bash | |
| run: | | |
| # uv venv | |
| FLUTTER_VERSION="$( uv run python -c 'import flet.version; print(flet.version.flutter_version)' )" | |
| echo "FLUTTER_VERSION=$FLUTTER_VERSION" >> "$GITHUB_ENV" | |
| echo "Flutter version: $FLUTTER_VERSION" | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| cache: true | |
| channel: stable | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| - name: Flet Build AAB | |
| shell: bash | |
| run: | | |
| uv run flet build aab --yes --verbose --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION | |
| - name: Upload AAB Artifact | |
| uses: actions/upload-artifact@v5.0.0 | |
| with: | |
| name: aab-build-${{ matrix.os }}-artifact | |
| path: build/aab | |
| if-no-files-found: warn | |
| overwrite: false | |
| build-apk: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu, macos, windows ] | |
| runs-on: ${{ matrix.os }}-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup cmake | |
| uses: jwlawson/actions-setup-cmake@v2 | |
| with: | |
| cmake-version: ${{ env.CMAKE_VERSION }} | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Get Flutter version | |
| shell: bash | |
| run: | | |
| # uv venv | |
| FLUTTER_VERSION="$( uv run python -c 'import flet.version; print(flet.version.flutter_version)' )" | |
| echo "FLUTTER_VERSION=$FLUTTER_VERSION" >> "$GITHUB_ENV" | |
| echo "Flutter version: $FLUTTER_VERSION" | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| cache: true | |
| channel: stable | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| - name: Flet Build APK | |
| shell: bash | |
| run: | | |
| uv run flet build apk --yes --verbose --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION | |
| - name: Upload APK Artifact | |
| uses: actions/upload-artifact@v5.0.0 | |
| with: | |
| name: apk-build-${{ matrix.os }}-artifact | |
| path: build/apk | |
| if-no-files-found: warn | |
| overwrite: false | |
| build-ipa: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Get Flutter version | |
| shell: bash | |
| run: | | |
| # uv venv | |
| FLUTTER_VERSION="$( uv run python -c 'import flet.version; print(flet.version.flutter_version)' )" | |
| echo "FLUTTER_VERSION=$FLUTTER_VERSION" >> "$GITHUB_ENV" | |
| echo "Flutter version: $FLUTTER_VERSION" | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| cache: true | |
| channel: stable | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| - name: Flet Build IPA | |
| run: | | |
| uv run flet build ipa --yes --verbose --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION | |
| - name: Upload IPA Artifact | |
| uses: actions/upload-artifact@v5.0.0 | |
| with: | |
| name: ipa-build-artifact | |
| path: build/ipa | |
| if-no-files-found: warn | |
| overwrite: false | |
| build-web: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu, macos, windows ] | |
| runs-on: ${{ matrix.os }}-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Get Flutter version | |
| shell: bash | |
| run: | | |
| # uv venv | |
| FLUTTER_VERSION="$( uv run python -c 'import flet.version; print(flet.version.flutter_version)' )" | |
| echo "FLUTTER_VERSION=$FLUTTER_VERSION" >> "$GITHUB_ENV" | |
| echo "Flutter version: $FLUTTER_VERSION" | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| cache: true | |
| channel: stable | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| - name: Flet Build Web | |
| shell: bash | |
| run: | | |
| uv run flet build web --yes --verbose | |
| - name: Upload Web Artifact | |
| uses: actions/upload-artifact@v5.0.0 | |
| with: | |
| name: web-build-${{ matrix.os }}-artifact | |
| path: build/web | |
| if-no-files-found: warn | |
| overwrite: false | |
| # dependabot: | |
| # name: 'Dependabot' | |
| # needs: [build-aab, build-apk, build-ipa, build-linux, build-macos, build-web, build-windows] | |
| # runs-on: ubuntu-latest | |
| # if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} | |
| # permissions: | |
| # contents: write | |
| # pull-requests: write | |
| # steps: | |
| # - name: Merge Dependabot PR | |
| # env: | |
| # PR_URL: ${{github.event.pull_request.html_url}} | |
| # GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| # run: gh pr merge --auto --merge "$PR_URL" |