-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathHOW_TO_RELEASE
More file actions
80 lines (60 loc) · 2.34 KB
/
HOW_TO_RELEASE
File metadata and controls
80 lines (60 loc) · 2.34 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Prerequisites
The following packages are needed for the release process:
- build
- pipenv
- setuptools
- twine
- wheel
# Steps
## Update Pipfile.lock
Make sure the Pipfile.lock is up to date with the latest dependencies:
```
python3 -m pipenv update
```
## Validate tests pass
To release a new version of waapi-client-python, make sure the test suite passes for all versions covered by `tox.ini`.
## Bump version
The version is a field in `setup.py`: only bump the major on a breaking change.
## Update the CHANGELOG
Make sure to update the CHANGELOG file with the latest changes for that release.
Explain any changes and/or limitation, and the impact it has on users of the library.
## Test install from the pypitest server
To test the package installs correctly, first package it with the following command:
```
# Run from clone root, first install the `build` package if you don't have it
python3 -m build --wheel --sdist .
```
Then, upload to the `pypitest` to make sure the install process works.
You will need to first log into test.pypi.org, enable 2-factor authentication and generate an API token at
https://test.pypi.org/manage/account/token/ (or go to your Account Settings, scroll down to the "API tokens" section and
click on "Add API token"). Make it a project-scope token only to waapi-client.
Once this is done, copy the token and run:
```
# Run from clone root, first install the `twine` package if you don't have it
python3 -m twine upload -r testpypi dist/*
```
When asked for a username, enter `__token__` and paste the token you generated at password input.
If successful, you can validate the package installs correctly by doing:
```
python3 -m pip install -i https://test.pypi.org/simple/ waapi-client
```
## Upload on the real server
You can do the same as the above on the real server:
```
python3 -m twine upload dist/*
```
Again, confirm the version installs correctly.
## Release on Github
Finally, release the code on Github with a version tag.
Tag the HEAD commit of master you uploaded with
```
# Version has a `v` prefix, e.g., v0.7
git tag vVERSION
```
Then push the master branch with tags:
```
# Assuming you have a remote called `github`
git push github --tags
```
On Github, create a new release and copy the latest CHANGELOG entry text into the release body.
Releases appear at https://github.com/audiokinetic/waapi-client-python/releases