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: Build & Publish Flet Extensions | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| # paths: | |
| # - "sdk/python/packages/flet-ads/**" | |
| tags: | |
| - '*' | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: write | |
| env: | |
| ROOT: "${{ github.workspace }}" | |
| SDK_PYTHON: "${{ github.workspace }}/sdk/python" | |
| SCRIPTS: "${{ github.workspace }}/.github/scripts" | |
| UV_PYTHON: "3.12" | |
| # PKG_VER: "0.2.0" | |
| # BUILD_VER: "0.2.0+${{ github.run_number }}" | |
| # PYPI_VER: "0.2.0.dev${{ github.run_number }}" | |
| jobs: | |
| build: | |
| name: Publish extensions | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Filter publish-relevant changes | |
| uses: dorny/paths-filter@v3 | |
| id: changes | |
| with: | |
| filters: | | |
| ads: | |
| - "sdk/python/packages/flet-ads/**" | |
| - name: Setup Flutter | |
| uses: kuhnroyal/flutter-fvm-config-action/setup@v3 | |
| with: | |
| path: '.fvmrc' | |
| cache: true | |
| - name: Publish flet-ads | |
| # if: | |
| working-directory: ${{ env.SDK_PYTHON }}/packages/flet-ads | |
| run: | | |
| source "$SCRIPTS/common.sh" | |
| pushd "src/flutter/flet_ads" | |
| patch_pubspec_version "pubspec.yaml" "$PKG_VER" | |
| dart pub get && dart analyze | |
| popd | |
| compute_build_versions flet-ads | |
| uv version "$PYPI_VER" | |
| uv build | |
| ls -laR "${SDK_PYTHON}/dist" | |
| uv publish --dry-run "${SDK_PYTHON}/dist/flet_ads*" | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: | | |
| $SDK_PYTHON/dist/*.whl | |
| $SDK_PYTHON/dist/*.tar.gz | |
| # - name: Publish Python package | |
| # if: > | |
| # startsWith(github.ref, 'refs/tags/') | |
| # || (github.ref == 'refs/heads/main' && | |
| # steps.changes.outputs.publish == 'true') | |
| # run: uv publish --dry-run |