Publishing to PyPI or Artifactory¶
Releasing from GitHub¶
To successfully publish your project from the release workflow, you'll need to add some secrets to your GitHub repository so they can be used as environment variables.
Set-up for PyPI¶
To publish to PyPI, you'll need to set the secret PYPI_TOKEN in your repository. Here's how to do it:
- Navigate to
Settings > Secrets > Actionsin your GitHub repository and clickNew repository secret. - Name the secret
PYPI_TOKEN. - In a new tab, go to your PyPI Account settings and select
Add API token. - Copy the token and paste it into the
Valuefield for the GitHub secret you created in the previous step. You're all set!
Publishing from Your Local Machine¶
While it is possible to release locally, it is not recommended. If you choose to release locally, set the repository secrets as environment variables on your local machine and run:
make bake-and-publish