Creating and deploying a new package version is easy!
-
Ensure you're on the latest
master
branch -
Ensure the master already has an incremented version
-
(Required if you are manually publishing to PyPI) Ensure you have access to a PyPI account that is a maintainer of scaleapi on PyPI
How to Bump Project Version
Ensure _version.py
has an updated project version. If not, please increment the project version, commit and push the changes.
We use semantic versioning. If you are adding a meaningful feature, bump the minor version. If you are fixing a bug, bump the incremental version.
Our repo already has a publish worklow built into the CircleCI. It's trigerred when there's a new release on GitHub, with a specific version tag.
In order to deploy and publish a new version:
- Create a new Release on GitHub
- Create and assign a new tag in the release page with the following template:
vX.Y.Z
Please make sureX.Y.Z
is matching the version in the_version.py
.- i.e. If the version in
_version.py
is 2.3.1 then the tag should be v2.3.1
- i.e. If the version in
- Provide release notes by following the Release Notes Template and filling relevant sections to your changes.
Step 1: Run Publish Script
./publish.sh
If you want to run test cases via pytest
before publishing, add the optional runtest
arg to the script.
You need to set your own test key as SCALE_TEST_API_KEY
environment variable before running.
SCALE_TEST_API_KEY="{apikey}|{userid}|test" ./publish.sh runtest
Step 2: Check out the PyPI page to ensure all looks good
https://pypi.org/project/scaleapi/
Step 3: Create a New Release
Create a new release on GitHub with a matching version tag (i.e. v2.0.1). Provide release notes by following the Release Notes Template and filling relevant sections to your changes.