feat: add initial structured-data t-string backends and release automation #3
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: Release Check | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: release-check-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| verify-package-distributions: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: "3.14" | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@1.94.0 | |
| - name: Build pure Python distributions | |
| run: | | |
| uv build tstring-core --out-dir dist | |
| uv build json-tstring --out-dir dist | |
| uv build toml-tstring --out-dir dist | |
| uv build yaml-tstring --out-dir dist | |
| - name: Build bindings source distribution | |
| run: uvx maturin sdist --manifest-path rust/python-bindings/Cargo.toml --out dist | |
| - name: Check distribution metadata | |
| run: uvx twine check dist/* | |
| verify-bindings-wheels: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: linux | |
| runner: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| maturin_args: --release --manifest-path rust/python-bindings/Cargo.toml --out dist --compatibility pypi -i python3.14 | |
| - os: macos | |
| runner: macos-14 | |
| target: aarch64-apple-darwin | |
| maturin_args: --release --manifest-path rust/python-bindings/Cargo.toml --out dist --compatibility pypi | |
| - os: windows | |
| runner: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| maturin_args: --release --manifest-path rust/python-bindings/Cargo.toml --out dist --compatibility pypi | |
| runs-on: ${{ matrix.runner }} | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: "3.14" | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@1.94.0 | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Build pure Python wheels | |
| run: | | |
| uv build tstring-core --wheel --out-dir dist | |
| uv build json-tstring --wheel --out-dir dist | |
| uv build toml-tstring --wheel --out-dir dist | |
| uv build yaml-tstring --wheel --out-dir dist | |
| - name: Build bindings wheel | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: ${{ matrix.maturin_args }} | |
| manylinux: "2_28" | |
| sccache: "true" | |
| - name: Check distribution metadata | |
| shell: bash | |
| run: uvx twine check dist/* | |
| - name: Smoke test installed wheels | |
| shell: bash | |
| run: | | |
| uv venv --python 3.14 .smoke-venv | |
| if [ -x .smoke-venv/bin/python ]; then | |
| PYTHON_BIN=.smoke-venv/bin/python | |
| else | |
| PYTHON_BIN=.smoke-venv/Scripts/python.exe | |
| fi | |
| "$PYTHON_BIN" - <<'PY' | |
| from pathlib import Path | |
| import subprocess | |
| import sys | |
| wheels = sorted(str(path) for path in Path("dist").glob("*.whl")) | |
| if not wheels: | |
| raise SystemExit("No wheels were built.") | |
| subprocess.run( | |
| ["uv", "pip", "install", "--python", sys.executable, "--force-reinstall", *wheels], | |
| check=True, | |
| ) | |
| PY | |
| "$PYTHON_BIN" -c "import json_tstring, toml_tstring, yaml_tstring, tstring_bindings, tstring_core" |