-
Notifications
You must be signed in to change notification settings - Fork 9
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
gh-421: fix TestPyPI deployment #427
base: main
Are you sure you want to change the base?
Conversation
Closes #421. Allows one to use `workflow_dispatch` to deploy the current setup to TestPyPI, this should allow us to test things work as expected. However, it still ensures that the `publish` workflow is still protected by the GitHub environment. This is achieved by changing the name of the job to `test-publish` when called with called by `workflow_dispatch`.
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.
Thanks, @paddyroddy! Looks good!
name: >- | ||
${{ (github.event_name == 'release' && | ||
github.event.action == 'published') && | ||
'publish' || | ||
'test-publish' }} | ||
url: >- | ||
${{ (github.event_name == 'release' && | ||
github.event.action == 'published') && | ||
'https://pypi.org/project/glass' || | ||
'https://test.pypi.org/project/glass' }} |
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.
TIL: this works as inline if-else
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.
It's a weird syntax
Closes #421. Allows one to use
workflow_dispatch
to deploy the current setup to TestPyPI, this should allow us to test things work as expected.However, it still ensures that the
publish
workflow is still protected by the GitHub environment. This is achieved by changing the name of the job totest-publish
when called with called byworkflow_dispatch
.