gflow 0.4.13

A lightweight, single-node job scheduler written in Rust.
Documentation
name: Maturin Build

on:
    push:
        tags:
            - "*"
    workflow_dispatch:

concurrency:
    group: ${{ github.workflow }}-${{ github.ref }}
    cancel-in-progress: true

permissions:
    contents: read

jobs:
    linux:
        runs-on: ${{ matrix.platform.runner }}
        timeout-minutes: 60
        strategy:
            matrix:
                platform:
                    - runner: ubuntu-22.04
                      target: x86_64
                    - runner: ubuntu-22.04
                      target: aarch64
        steps:
            - uses: actions/checkout@v6
            - name: Build wheels
              uses: PyO3/maturin-action@v1
              with:
                  target: ${{ matrix.platform.target }}
                  args: --release --out dist
                  sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
                  manylinux: auto
              env:
                  CFLAGS: "-Wno-error"
                  CFLAGS_aarch64_unknown_linux_gnu: "-Wno-error -D__ARM_ARCH=8"
            - name: Upload wheels
              uses: actions/upload-artifact@v7
              with:
                  name: wheels-linux-${{ matrix.platform.target }}
                  path: dist

    sdist:
        runs-on: ubuntu-latest
        timeout-minutes: 20
        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@v7
              with:
                  name: wheels-sdist
                  path: dist

    release:
        name: Release
        runs-on: ubuntu-latest
        timeout-minutes: 20
        if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
        needs: [linux, sdist]
        permissions:
            # Use to sign the release artifacts
            id-token: write
            # Used to upload release artifacts
            contents: write
            # Used to generate artifact attestation
            attestations: write
        steps:
            - uses: actions/download-artifact@v8
            - name: Generate artifact attestation
              uses: actions/attest-build-provenance@v4
              with:
                  subject-path: "wheels-*/*"
            - name: Install uv
              if: ${{ startsWith(github.ref, 'refs/tags/') }}
              uses: astral-sh/setup-uv@v7
            - name: Publish to PyPI
              if: ${{ startsWith(github.ref, 'refs/tags/') }}
              run: uv publish 'wheels-*/*'