Creating and deploying a new package version is easy
-
Ensure you have a PyPI account created and are added as a Collaborator
-
Store PyPI API Token to GitHub Secrets
If you have already created GitHub SecretPYPI_API_TOKEN, skip this step.-
Get PyPI API Token
- Go to PyPI Account Settings Page
- Click
Add API Tokenbutton in API Token section - Enter the following
- Token name:
GitHub Actions Token - Scope:
Project: fastlabel
- Token name:
- Click
Add Tokenbutton and get API Token
-
Store Token to GitHub Secrets
- Go to GitHub
fastlabel-python-sdkrepository - Go to Settings > Secrets > Actions
- Click
New repository secretand enter the following- Name:
PYPI_API_TOKEN - Value: PyPI API Token
- Name:
- Go to GitHub
-
Step 1: Create a new release
-
Click
Releaseslabel inCodetab and go to Releases page -
Click
Draft a new releasebutton -
Enter the following
-
Tag
- Click
Choose a tagselect box - input version (ex:
1.12.0) - Click
Create new tag: x.x.x
- Click
-
Target: main
-
Release title:
Release x.x.x(ex:Release 1.12.0) -
Fill in the description with reference to past releases
-
-
Click
Publish releasebutton
Step 2: (Automatically) Execute GitHub Actions Workflow
After creating a release, GitHub Actions Workflow will be triggered automatically.
This workflow builds the SDK distribution and uploads it to PyPI.
If the workflow fails, follow these steps:
- Fix the cause of the error
- Remove release created in Step 1
- Remove tag created in Step 1
- Repeat from Step 1
Step 3: Check out the PyPI page to ensure all looks good
https://pypi.org/project/fastlabel/
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.