Skip to content

Merge pull request #122 from harvard-lil/fat-binoc-distribution #3

Merge pull request #122 from harvard-lil/fat-binoc-distribution

Merge pull request #122 from harvard-lil/fat-binoc-distribution #3

Workflow file for this run

name: Publish
on:
push:
tags:
- "binoc-v*"
# binoc-sqlite and binoc-stat-binary publishing is paused; both ship
# in-process via the fat `binoc` wheel. See
# docs/adr/2026-06-30-fat_binoc_distribution_and_abi_canary.md.
- "binoc-sdk-v*"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
env:
CARGO_TERM_COLOR: always
jobs:
build-binoc-wheels:
name: Build binoc wheels (${{ matrix.artifact }})
if: startsWith(github.ref_name, 'binoc-v')
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact: linux-x86_64
target: x86_64-unknown-linux-gnu
manylinux: auto
interpreter: python3.10
- os: windows-latest
artifact: windows-x86_64
target: x86_64-pc-windows-msvc
manylinux: off
interpreter: python
- os: macos-15-intel
artifact: macos-x86_64
target: x86_64-apple-darwin
manylinux: off
interpreter: python
- os: macos-14
artifact: macos-aarch64
target: aarch64-apple-darwin
manylinux: off
interpreter: python
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.10"
- uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
with:
command: build
working-directory: binoc-python
target: ${{ matrix.target }}
manylinux: ${{ matrix.manylinux }}
args: --release --interpreter ${{ matrix.interpreter }} --out dist
sccache: "true"
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: binoc-dist-${{ matrix.artifact }}
path: binoc-python/dist
build-binoc-sdist:
name: Build binoc sdist
if: startsWith(github.ref_name, 'binoc-v')
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
with:
command: sdist
working-directory: binoc-python
args: --out dist
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: binoc-dist-sdist
path: binoc-python/dist
publish-binoc:
name: Publish binoc to PyPI
if: startsWith(github.ref_name, 'binoc-v')
runs-on: ubuntu-latest
needs: [build-binoc-wheels, build-binoc-sdist]
environment:
name: pypi-binoc
url: https://pypi.org/project/binoc/
permissions:
contents: read
id-token: write
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: binoc-dist-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
with:
packages-dir: dist
publish-binoc-sdk:
name: Publish binoc-sdk to crates.io
if: startsWith(github.ref_name, 'binoc-sdk-v')
runs-on: ubuntu-latest
environment:
name: crates-io-binoc-sdk
url: https://crates.io/crates/binoc-sdk
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: rust-lang/crates-io-auth-action@c6f97d42243bad5fab37ca0427f495c86d5b1a18 # v1.0.5
id: auth
- run: cargo publish -p binoc-sdk --locked
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}