Skip to content

Commit

Permalink
Document how to release a new package version
Browse files Browse the repository at this point in the history
  • Loading branch information
mjenczmyk committed Nov 21, 2019
1 parent e44528a commit a86477e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
24 changes: 24 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Release process

First install development dependencies. Make sure you're on `master` branch with all changes that are going to be released.

```
pip install -e '.[dev]'
```

Then run `bumpversion part` to bump version of the script. `part` may be either `patch`, `minor` or `major`, decide
which one to use according to [semantic versioning](https://semver.org/). `bumpversion` will bump script's version
in files inside repository, commit the changes and tag the commit with `vX.Y.Z` tag, where `X.Y.Z` is the current
version of the script. Now push the commit and the tag.

```
git push origin && git push origin vX.Y.Z
```

The new version has already been tagged in `git` repository, now it's time to release a new version on [PyPI](https://pypi.org/project/packt/). Run `python setup.py sdist` to build the package for the new release, check if build was successful by running `twine check dist/*`. If everything is alright run

```
twine upload dist/*
```

to release a new version to PyPI.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
]

dev_requirements = [
'bumpversion==0.5.3',
'mccabe==0.6.1',
'pycodestyle==2.5.0',
'pyflakes==2.1.1',
'pylama==7.7.1'
'pylama==7.7.1',
'twine==1.15.0'
]

setup(
Expand Down

0 comments on commit a86477e

Please sign in to comment.