Skip to content

Commit

Permalink
Docs for PYPI deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhbell committed Jan 6, 2025
1 parent 5df9563 commit 80170f2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,3 +426,13 @@ cmake --build . --target multifluid_crit

pip install scikit-build-core[pyproject]
pip install --no-build-isolation -ve .

## Deployment to PYPI

Wheels are build on a github action for all platforms. The wheels are merged into one archive, and that archive is pushed to PyPI, automatically on a release. To get this to all work:

* The first time you push to PyPI, there is no project to assign secrets to, so you need to push a wheel/sdist to PyPI using the PyPI-wide scope (which is generally not recommended due to the fact that if the token is compromised, an attacker could push artifacts to any project linked with the user)
* After the first push, log into PyPI, go to Account Settings -> API tokens, make a scoped token for the project, tied only to ``teqp`` scope. Make sure you store that token somewhere secret.
* Go to settings for the repository on GitHub. In there, Go to "Settings"->"Secrets and variables"->"Actions"
* In there, add a repository secret with the name "PYPI_TOKEN" and token that you obtained from PyPI
* Make a release on GitHub. The wheels should build and push to PyPI with no further intervention

0 comments on commit 80170f2

Please sign in to comment.