Release Process¶
This page summarizes the production release workflow for spectral-library.
Before Tagging¶
- Update
src/spectral_library/_version.pyandpyproject.tomlif the version changes. - Add a new entry to
CHANGELOG.md. - Add release notes under
docs/releases/<version>.md. - Run:
PYTHONPATH=src python3 -m unittest discover -s tests
PYTHONPATH=src python3 scripts/run_full_library_benchmarks.py \
--prepared-root /path/to/prepared/runtime \
--neighbor-estimator simplex_mixture \
--knn-backend numpy \
--k 10 \
--max-test-rows 512 \
--output-root build/full-library-benchmarks \
--thresholds benchmarks/default_thresholds.json \
--fail-on-thresholds
python3 -m pip install build
python3 scripts/build_distribution.py
python3 scripts/package_prepared_runtime.py \
--prepared-root /path/to/prepared/runtime \
--output-dir dist
Package Checks
- Security Checks
- CodeQL
6. Confirm the repository-level release settings are still configured:
- PyPI trusted publishing on the pypi environment
- GitHub Pages publishing from GitHub Actions
- dependency graph and code scanning enabled
Tagging¶
Create and push a version tag:
git tag v0.6.3
git push origin v0.6.3
CI Responsibilities¶
The tagged release workflow:
- builds wheel and sdist artifacts
- generates CycloneDX SBOM files for the wheel and sdist install environments
- installs each artifact in a clean environment
- runs public CLI smoke tests
- writes GitHub build-provenance and SBOM attestations
- publishes to PyPI through trusted publishing
- creates the GitHub release using the matching release-notes file
Pre-built prepared-runtime tarballs are packaged separately with
scripts/package_prepared_runtime.py and attached to the GitHub Release after
the tagged package workflow succeeds.
The scheduled full-library benchmark workflow is separate from tagged package
release publishing. It runs from
full-library-benchmarks.yml
when the repository variable FULL_LIBRARY_PREPARED_ROOT is configured.
The docs site is published separately from pushes to main through the GitHub
Pages workflow.
Security policy is enforced continuously outside the release job by:
security-checks.ymlfor dependency review andpip-auditcodeql.ymlfor Python CodeQL analysisdependabot.ymlfor weekly GitHub Actions and Python dependency update PRs
All workflow action dependencies are pinned to immutable SHAs, with Dependabot configured to refresh those pins through reviewed PRs.