-
Notifications
You must be signed in to change notification settings - Fork 1
ci: build and publish at pypi/test-pypi #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very good as-is, so I'm giving the ✔️
question(non-blocking): should we run tests in this workflow before build+release to avoid releasing broken code by accident?
Good point - I added a Publishing fails in the current test-publish action because the current version already exists at test-pypi. To solve this, it is suggested to make dev releases on pypi (see pypi/warehouse#726), but I thought it is not necessary, because the changes should not affect publishing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very clean and DRY, 👍
We can test it with a minor release now that we have #96 merged
Scope:
Two new github action workflows with 2 jobs each:
poetry-publish
: 1. build modos-api and 2. publish at pypi, triggered on published releasespoetry-test-publish
: 1. build modos-api and 2. publish at test-pypi, manually triggered by workflow dispatchThe publishing job uses trusted publisher management for authentication, which requires write permission. To not elevate privileges building and publishing were separated into two different ci-jobs as recommended.
Limitations:
So far only
poetry-test-publish
was run (see output) and tested. Both workflows are build analogous, but I think we have to wait for the next release to checkpoetry-publish
?