You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: Fix conditions for building and publishing (#313)
* ci: Fix conditions for building and publishing
Based ont he github documentation:
github.events.ref: Is the ref of a release that has been created
github.ref: If the branch that is being used (depending on the action)
- create a release: It will be refs/tags/<tag_name>
- create a pull request: It will be refs/pull/<pr_number>/merge
- push to a branch: It will be refs/heads/<branch_name>
For publishing to pypi, we are targeting the "create a release" event.
In which case:
- github.events.ref will be refs/tags/<tag_name>
- github.ref will also be refs/tags/<tag_name>
So, it looks like our IF condition was incorrect.
Ref: https://docs.github.com/en/actions/learn-github-actions/environment-variables
* ci: Remove github.event.ref and use github.ref
The github.event.ref and github.ref will always be same for the "push"
event. So, we don't need to use github.event.ref in general.
0 commit comments