β¬οΈ deps: Update dependencies (non-major) (#47) #149
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 and Release | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.13"] | |
| target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] | |
| name: Ubuntu, ${{ matrix.target }}, Python ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist --find-interpreter | |
| sccache: "true" | |
| manylinux: auto | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: wheels-ubuntu-${{ matrix.target }}-${{ matrix.python-version }} | |
| path: dist | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.13"] | |
| target: [x64, x86] | |
| name: Windows, ${{ matrix.target }}, Python ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: ${{ matrix.target }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist --find-interpreter | |
| sccache: "true" | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: wheels-windows-${{ matrix.target }}-${{ matrix.python-version }} | |
| path: dist | |
| macos: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.13"] | |
| target: [x86_64, aarch64] | |
| name: macOS, ${{ matrix.target }}, Python ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist --find-interpreter | |
| sccache: "true" | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: wheels-macos-${{ matrix.target }}-${{ matrix.python-version }} | |
| path: dist | |
| sdist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build sdist | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| command: sdist | |
| args: --out dist | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: wheels-sdist | |
| path: dist | |
| publish-pypi: | |
| runs-on: ubuntu-latest | |
| name: Publish to PyPI | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| needs: [linux, windows, macos, sdist] | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Retrieve release distributions | |
| uses: actions/download-artifact@v7 | |
| with: | |
| pattern: wheels-* | |
| merge-multiple: true | |
| path: dist | |
| - name: Publish release distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| publish-github-releases: | |
| runs-on: ubuntu-latest | |
| name: Publish to GitHub Releases | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| needs: [linux, windows, macos, sdist] | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| pattern: wheels-* | |
| merge-multiple: true | |
| path: dist | |
| - name: Get tag name | |
| run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
| - name: Publish to GitHub | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| files: dist/* | |
| tag_name: ${{ env.RELEASE_VERSION }} | |
| publish-crates-io: | |
| runs-on: ubuntu-latest | |
| name: Publish to Crates.io | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - name: Publish to Crates.io | |
| uses: katyo/publish-crates@v2 | |
| id: publish-crates | |
| with: | |
| registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} |