Commit 1e118de
authored
ci: Fix conditions for building and publishing (JessicaTegner#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.1 parent 8dc63f3 commit 1e118de
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
0 commit comments