Skip to content

chore: release v2.19.0 with upstream skills ab2f84ab1059 #5

chore: release v2.19.0 with upstream skills ab2f84ab1059

chore: release v2.19.0 with upstream skills ab2f84ab1059 #5

Workflow file for this run

name: Release
# Publishes to PyPI via Trusted Publishing (OIDC) — no long-lived token anywhere.
# One-time setup on pypi.org: project "scientific-writer" → Settings → Publishing →
# add GitHub publisher (owner K-Dense-AI, repo claude-scientific-writer,
# workflow release.yml, environment pypi).
on:
push:
tags: ["v*"]
jobs:
publish:
name: Verify and publish to PyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v9.0.0
with:
python-version: "3.12"
- name: Sync locked environment
run: uv sync --frozen --group dev
- name: Tag matches package version
run: |
python - <<'EOF'
import os, re, sys
text = open("pyproject.toml").read()
version = re.search(r'^version\s*=\s*"([^"]+)"', text, re.M).group(1)
tag = os.environ["GITHUB_REF_NAME"].removeprefix("v")
if tag != version:
sys.exit(f"tag v{tag} does not match pyproject version {version}")
print(f"tag matches version {version}")
EOF
- name: Ruff
run: uv run --frozen ruff check .
- name: Mypy
run: uv run --frozen mypy
- name: Pytest
run: uv run --frozen pytest tests/ -q
- name: Codespell
run: >-
uv run --frozen codespell README.md CHANGELOG.md CONTRIBUTING.md
example_api_usage.py CLAUDE.md pyproject.toml
.env.example scientific_writer scripts tests docs commands templates .github
- name: Skill mirrors in sync
run: uv run --frozen python scripts/sync_skills.py --check
- name: Repository consistency
run: uv run --frozen python scripts/check_consistency.py
- name: Package verification
run: uv run --frozen python scripts/verify_package.py
- name: Build
run: uv build
- name: Wheel ships the .claude payload
run: |
python - <<'EOF'
import sys
from pathlib import Path
sys.path.insert(0, "scripts")
from publish import verify_wheel_payload
verify_wheel_payload(Path("dist"))
EOF
- name: Publish (trusted publishing)
run: uv publish --trusted-publishing always