forked from websocket-client/websocket-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload.sh
31 lines (24 loc) · 1020 Bytes
/
upload.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# This is a small script to upload
# new releases to PyPI
# Create virtual environment
python3 -m venv /tmp/ws-venv/
source /tmp/ws-venv/bin/activate
# Install dependencies
pip3 install -U twine
# build the package
python -m build
# Run Twine check to verify descriptions are valid
twine check dist/*
# Upload to test PyPI first to verify everything
# The secure approach is to get an API token
# Then pass __token__ as the username and the token value as password
# https://packaging.python.org/en/latest/tutorials/packaging-projects/#uploading-the-distribution-archives
twine upload --repository testpypi dist/*
# Now upload to production PyPI
# The secure approach is to get an API token
# Then pass __token__ as the username and the token value as password
# https://packaging.python.org/en/latest/tutorials/packaging-projects/#uploading-the-distribution-archives
twine upload dist/*
# Clean up
# Delete the build/, dist/, and websocket_client.egg-info/ directories
rm -r build dist websocket_client.egg-info