name: Publish to PyPI (manual fallback) # DEPRECATED: This workflow is superseded by release.yml's matrix-based # build-and-publish flow. It exists as a manual fallback in case release.yml # is broken and a hotfix needs to be pushed without going through the # normal tag-driven pipeline. Single-platform; produces only the linux # x86_64 wheel + sdist. For full cross-platform release, use release.yml. on: workflow_dispatch: jobs: publish: runs-on: ubuntu-latest environment: pypi permissions: id-token: write # For trusted publishing contents: write # For uploading release assets steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: "3.11" - name: Install Rust toolchain uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable with: toolchain: 1.95.0 # Keep in sync with rust-toolchain.toml. - name: Cache cargo registry + build uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3 with: workspaces: ". -> target" - name: Install build tools run: | python -m pip install --upgrade pip 'maturin>=1.5,<2.0' cyclonedx-bom - name: Build wheel + sdist run: | maturin sdist --out dist maturin build --release --out dist - name: Generate SBOM (CycloneDX) run: | pip install -e ".[proxy]" cyclonedx-py environment \ --output-format json \ --outfile dist/headroom-sbom.cdx.json - name: Upload SBOM to release uses: softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3.0.4 with: files: dist/headroom-sbom.cdx.json - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3