e publish to test.pypi.org on release #77
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds GitHub Actions workflow that will publish this package to
test.pypi.org on release. If successful we can change this to push to
the real pypi.org.
Setup that needs to be done before this is merged:
[ ] login to https://test.pypi.org and create a token for this project
[ ] add a GitHub secret for this token with the name TEST_PYPI_PASSWORD
Once merged we can create a release that will push to test.pypi by:
I had some security concerns around this approach but they are mitigated
by GitHub's controls (described below).
Threat 1: Someone could submit a pull request that leaks your tokens
(e.g. add a line like print(os.environ['SECRET_TOKEN'])).
Control: GitHub run all pull request workflows raised repository
forks with no access to secrets, see
https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/
Threat 2: Someone could submit a pull request that alters the
publish.yml workflow so that it publishes on the pull_request event
instead of the release created event.
Control: same as for Threat 1.