Skip to content

Commit 9a524a7

Browse files
docs: add PyPI publishing instructions
1 parent b953bd1 commit 9a524a7

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

PUBLISHING.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Publishing to PyPI
2+
3+
## Prerequisites
4+
5+
1. Create a PyPI account at https://pypi.org/account/register/
6+
2. Generate an API token at https://pypi.org/manage/account/token/
7+
3. Install build tools: `pip install build twine`
8+
9+
## Publishing Steps
10+
11+
1. **Build the package:**
12+
```bash
13+
python -m build
14+
```
15+
16+
2. **Check the package:**
17+
```bash
18+
twine check dist/*
19+
```
20+
21+
3. **Upload to PyPI:**
22+
```bash
23+
# Using environment variable
24+
export TWINE_USERNAME=__token__
25+
export TWINE_PASSWORD=your-pypi-api-token
26+
twine upload dist/*
27+
28+
# Or interactively
29+
twine upload dist/*
30+
# Username: __token__
31+
# Password: your-pypi-api-token
32+
```
33+
34+
## Testing on Test PyPI First
35+
36+
1. Upload to Test PyPI:
37+
```bash
38+
twine upload --repository testpypi dist/*
39+
```
40+
41+
2. Test installation:
42+
```bash
43+
pip install --index-url https://test.pypi.org/simple/ browsernative
44+
```
45+
46+
## After Publishing
47+
48+
Users can install with:
49+
```bash
50+
pip install browsernative
51+
```
52+
53+
## Version Updates
54+
55+
1. Update version in `browsernative/__init__.py`
56+
2. Update version in `setup.py` and `pyproject.toml`
57+
3. Update CHANGELOG.md
58+
4. Create git tag: `git tag v1.0.1`
59+
5. Push tags: `git push --tags`
60+
6. Build and upload new version

0 commit comments

Comments
 (0)