DuckDB Extensions #7
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: DuckDB Extensions | |
| on: | |
| push: | |
| tags: | |
| - "rustac-duckdb-extensions-v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - duckdb-platform: linux_amd64 | |
| wheel-platform: manylinux_2_28_x86_64 | |
| - duckdb-platform: linux_arm64 | |
| wheel-platform: manylinux_2_28_aarch64 | |
| - duckdb-platform: osx_amd64 | |
| wheel-platform: macosx_11_0_x86_64 | |
| - duckdb-platform: osx_arm64 | |
| wheel-platform: macosx_11_0_arm64 | |
| defaults: | |
| run: | |
| working-directory: duckdb-extensions | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Download extensions | |
| run: uv run --only-group build scripts/download_extensions.py ${{ matrix.duckdb-platform }} | |
| - name: Build wheel | |
| run: uv run --only-group build python -m hatchling build -t wheel | |
| working-directory: duckdb-extensions | |
| - name: Tag wheel | |
| run: >- | |
| uv run --only-group build python -m wheel tags | |
| --remove | |
| --platform-tag ${{ matrix.wheel-platform }} | |
| dist/*.whl | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: duckdb-extensions-${{ matrix.duckdb-platform }} | |
| path: duckdb-extensions/dist | |
| release: | |
| runs-on: ubuntu-latest | |
| if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} | |
| needs: | |
| - build | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/rustac-duckdb-extensions | |
| permissions: | |
| id-token: write | |
| contents: write | |
| attestations: write | |
| steps: | |
| - uses: actions/download-artifact@v7 | |
| - name: Generate artifact attestation | |
| uses: actions/attest-build-provenance@v3 | |
| with: | |
| subject-path: "duckdb-extensions-*/*" | |
| - name: Publish to PyPI | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: duckdb-extensions-*/ |