Skip to content

Commit 69b9440

Browse files
committed
Update release steps
1 parent 66e4724 commit 69b9440

File tree

1 file changed

+37
-34
lines changed

1 file changed

+37
-34
lines changed

RELEASING.md

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,53 @@
22

33
## Requirements
44

5-
- Local clone of this repository
6-
- Twine (`pip3 install twine`)
7-
- Account on test.pypi.org
8-
- Account on pypi.org
5+
- Virtual environment: `[[ -d .venv ]] || virtualenv .venv`
6+
- Local clone with dev environment: `.venv/bin/pip install -e ".[dev]"`
7+
- TestPyPI and PyPI accounts with Trusted Publishers configured ([details](https://docs.pypi.org/trusted-publishers/))
98

10-
## Steps
9+
## Release Process
1110

12-
1. Ensure the version in __docklib/\_\_init\_\_.py__ has been updated.
11+
1. **Switch to local dev branch**.
1312

14-
1. Ensure the change log has been updated and reflects actual release date.
13+
1. **Update version** in:
14+
- `docklib/__init__.py`
15+
- `pyproject.toml`
1516

16-
1. Merge development branch to main/master branch.
17+
1. **Update changelog**:
18+
- Reflect all recent changes
19+
- Add version number and release date
20+
- Add `## Unreleased` section
21+
- Update diff links at bottom
1722

18-
1. Run docklib unit tests and fix any errors:
23+
1. **Merge to main** and switch to local main branch.
1924

20-
managed_python3 -m unittest -v
25+
1. **Create and push tag**:
2126

22-
1. Build a new distribution package:
27+
```bash
28+
git tag -a v2.1.1 -m "Release version 2.1.1"
29+
git push origin v2.1.1
30+
```
2331

24-
rm -fv dist/*
25-
python3 setup.py sdist bdist_wheel
32+
1. **Monitor and approve publication**:
33+
- Automatically publishes to [TestPyPI](https://test.pypi.org/project/docklib/) for testing
34+
- GitHub Actions will wait for manual approval to publish to production PyPI
35+
- Go to [Actions](https://github.com/homebysix/docklib/actions) → "Release" workflow → click "Review deployments" → approve "production"
2636

27-
1. Upload package to test.pypi.org:
37+
1. **Create GitHub release** (manual):
38+
- Go to [Releases](https://github.com/homebysix/docklib/releases) and click "Create a new release"
39+
- Select the tag (v2.1.1), add release title and description from changelog
2840

29-
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
41+
## Manual Fallback
3042

31-
1. View resulting project on test.pypi.org and make sure it looks good.
43+
If GitHub Actions fail:
3244

33-
1. Install test docklib in MacAdmins Python on a test Mac:
45+
```bash
46+
# Test and build
47+
.venv/bin/python -m coverage run -m unittest discover -v tests/
48+
.venv/bin/python -m pip install build twine
49+
.venv/bin/python -m build
3450

35-
managed_python3 -m pip install --upgrade -i https://test.pypi.org/simple/ docklib
36-
37-
1. Perform tests - manual for now.
38-
39-
1. Upload package to pypi.org:
40-
41-
twine upload dist/*
42-
43-
1. View resulting project on pypi.org and make sure it looks good.
44-
45-
1. Install production docklib in MacAdmins Python on a test Mac:
46-
47-
managed_python3 -m pip install --upgrade docklib
48-
49-
1. Create new [release](https://github.com/homebysix/docklib/releases) on GitHub. Add notes from change log.
50-
51-
1. Announce to [dock-management](https://macadmins.slack.com/archives/C17NRH534) and other relevant channels, if desired.
51+
# Publish
52+
twine upload --repository testpypi dist/* # Test first
53+
twine upload dist/* # Then production
54+
```

0 commit comments

Comments
 (0)