Pre release version validation script
Skill kjuhwa/skills-hub/skills/release/pre-release-version-validation-script
Pre-release script validates: tag matches pyproject version, copyright headers exist on all source files, package metadata fields complete, type checker passes.From its SKILL.md
npx -y skills add kjuhwa/skills-hub --skill pre-release-version-validation-scriptAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.8 KB, 294 tokens by cl100k_base, as published. Nobody here has run it
Pre Release Version Validation Script
Trigger: Automating a release pipeline and adding guard rails so you never publish a broken or mis-tagged package.
Steps
- Read the git tag from $GITHUB_REF_NAME or env var; extract the version (strip prefix like 'python-v').
- Compare against pyproject.toml [project].version; exit 1 on mismatch.
- Walk source files and check for the copyright header (regex); list all offenders if any are missing.
- Validate that name, version, author, license, urls are all populated in pyproject.toml.
- Run mypy / type checker; fail on any error.
- Optionally check that the package name is taken on PyPI (via API) — guards against typos.
Counter / Caveats
- Copyright regex is fragile; comment styles vary across languages and decades.
- Tag-to-version extraction must be consistent — off-by-one or prefix-mismatch is a common bug.
- Type checking can be slow on large codebases; parallelize or cache.
- The script is language-specific; you'll want similar guards in every binding (Cargo.toml version, package.json version).
Source
Extracted from magika (https://github.com/google/magika.git @ main).
Files of interest:
python/scripts/pre_release_check.py:1-60.github/workflows/python-build-and-release-package.yml:50-70
What ships with it: 1 file
954 B alongside SKILL.md
- content.md954 B