# Release Checklist

Use this checklist when preparing a new importsearch release.

1. **Update version**
   - Bump the version in `pyproject.toml`.
   - Record notable changes in `CHANGELOG.md` (or the release notes draft).

2. **Verify environment**
   - Ensure dependencies are installed: `pip install -r requirements.txt` (if applicable).
   - Remove build artefacts: `rm -rf dist/ build/`.

3. **Run quality gates**
   - Unit tests: `pytest`
   - Static checks (optional): `ruff check`, `mypy`

4. **Smoke test the CLI**
   - `importsearch examples/sample_dir/target.py --root examples/sample_dir --output-format print`
   - Optionally run scenarios from `docs/cli-cheatsheet.md`.

5. **Build the distribution**
   - `pipx run hatch build`
   - Confirm wheels/tarballs appear under `dist/`.

6. **Upload to PyPI**
   - Dry run (optional): `pipx run twine check dist/*`
   - Publish: `pipx run twine upload dist/*`

7. **Post-release**
   - Tag the release in git: `git tag vX.Y.Z && git push origin vX.Y.Z`
   - Update documentation links and notify users if necessary.


# 1. パッケージをビルド
python -m build

# 2. TestPyPIで動作確認
twine upload --repository testpypi dist/*

# 3. 問題なければ本番PyPIに
twine upload dist/*