|
| 1 | +# Release Checklist |
| 2 | + |
| 3 | +Quick reference for publishing a new release to PyPI. |
| 4 | + |
| 5 | +## Pre-Release |
| 6 | + |
| 7 | +- [ ] All tests passing on main branch |
| 8 | +- [ ] CHANGELOG.md updated with release notes |
| 9 | +- [ ] Version bumped in: |
| 10 | + - [ ] `pyproject.toml` (line 7) |
| 11 | + - [ ] `setup.py` (line 8) |
| 12 | +- [ ] Changes committed and pushed to main |
| 13 | + |
| 14 | +## Release Process |
| 15 | + |
| 16 | +### 1. Create Git Tag |
| 17 | + |
| 18 | +```bash |
| 19 | +# Replace 0.1.0 with your version |
| 20 | +VERSION="0.1.0" |
| 21 | +git tag v${VERSION} |
| 22 | +git push origin v${VERSION} |
| 23 | +``` |
| 24 | + |
| 25 | +### 2. Create GitHub Release |
| 26 | + |
| 27 | +**Option A: GitHub CLI** |
| 28 | +```bash |
| 29 | +gh release create v${VERSION} \ |
| 30 | + --title "v${VERSION}" \ |
| 31 | + --notes-file CHANGELOG.md |
| 32 | +``` |
| 33 | + |
| 34 | +**Option B: GitHub Web UI** |
| 35 | +1. Go to https://github.com/cms-cat/mkdocs-header-dropdown/releases/new |
| 36 | +2. Choose tag: `v0.1.0` |
| 37 | +3. Release title: `v0.1.0` |
| 38 | +4. Copy release notes from CHANGELOG.md |
| 39 | +5. Click "Publish release" |
| 40 | + |
| 41 | +### 3. Verify Automatic Publishing |
| 42 | + |
| 43 | +The CD workflow automatically: |
| 44 | +- ✅ Builds source and wheel distributions |
| 45 | +- ✅ Runs quality checks |
| 46 | +- ✅ Publishes to PyPI |
| 47 | + |
| 48 | +Monitor progress: |
| 49 | +https://github.com/cms-cat/mkdocs-header-dropdown/actions/workflows/cd.yml |
| 50 | + |
| 51 | +## Post-Release |
| 52 | + |
| 53 | +- [ ] Verify package appears on PyPI: https://pypi.org/project/mkdocs-header-dropdown/ |
| 54 | +- [ ] Test installation: `pip install mkdocs-header-dropdown==${VERSION}` |
| 55 | +- [ ] Verify plugin works in a test project |
| 56 | +- [ ] Update documentation if needed |
| 57 | +- [ ] Announce release (optional) |
| 58 | + |
| 59 | +## First Release Only |
| 60 | + |
| 61 | +Before the very first release, configure PyPI Trusted Publishing: |
| 62 | + |
| 63 | +1. Go to https://pypi.org/manage/account/publishing/ |
| 64 | +2. Add pending publisher: |
| 65 | + - **PyPI Project Name**: `mkdocs-header-dropdown` |
| 66 | + - **Owner**: `cms-cat` |
| 67 | + - **Repository**: `mkdocs-header-dropdown` |
| 68 | + - **Workflow**: `cd.yml` |
| 69 | + - **Environment**: `release` |
| 70 | + |
| 71 | +## Troubleshooting |
| 72 | + |
| 73 | +### Workflow Failed |
| 74 | +- Check Actions tab for error details |
| 75 | +- Common issues: |
| 76 | + - PyPI trusted publishing not configured |
| 77 | + - Version already exists on PyPI (bump version) |
| 78 | + - Build errors (test with `python -m build` locally) |
| 79 | + |
| 80 | +### Package Not Appearing on PyPI |
| 81 | +- Verify the release was published (not just created as draft) |
| 82 | +- Check workflow completed successfully |
| 83 | +- Wait a few minutes for PyPI to index |
| 84 | + |
| 85 | +### Import Errors After Installation |
| 86 | +- Verify templates included: `python -m zipfile -l dist/*.whl` |
| 87 | +- Check MANIFEST.in includes all necessary files |
| 88 | + |
| 89 | +## Version Numbering |
| 90 | + |
| 91 | +Follow [Semantic Versioning](https://semver.org/): |
| 92 | + |
| 93 | +- **MAJOR** (X.0.0): Breaking changes |
| 94 | +- **MINOR** (0.X.0): New features (backward compatible) |
| 95 | +- **PATCH** (0.0.X): Bug fixes |
| 96 | + |
| 97 | +Examples: |
| 98 | +- `0.1.0` → `0.1.1`: Bug fix |
| 99 | +- `0.1.0` → `0.2.0`: New feature |
| 100 | +- `0.9.0` → `1.0.0`: Stable release or breaking change |
| 101 | + |
| 102 | +## Quick Commands |
| 103 | + |
| 104 | +```bash |
| 105 | +# Check current version |
| 106 | +grep '^version = ' pyproject.toml |
| 107 | + |
| 108 | +# Test build locally |
| 109 | +python -m build |
| 110 | +twine check dist/* |
| 111 | + |
| 112 | +# Clean build artifacts |
| 113 | +rm -rf dist/ build/ *.egg-info |
| 114 | + |
| 115 | +# View releases |
| 116 | +gh release list |
| 117 | + |
| 118 | +# View workflow runs |
| 119 | +gh run list --workflow=cd.yml |
| 120 | +``` |
| 121 | + |
| 122 | +## Resources |
| 123 | + |
| 124 | +- Full guide: `PUBLISHING.md` |
| 125 | +- Workflow details: `.github/workflows/README.md` |
| 126 | +- PyPI package: https://pypi.org/project/mkdocs-header-dropdown/ |
| 127 | +- GitHub releases: https://github.com/cms-cat/mkdocs-header-dropdown/releases |
0 commit comments