When should I use both "github.event_name == 'push'" and "startsWith(github.ref, 'refs/tags')"? #223
-
Hello! The main README of this action states:
I do not understand the reason for the first clause The additional clause does not appear on packaging.python.org docs. Any help would be greatly appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
That tutorial shows the use of I like using the So the answer to your question is that you should study GitHub docs and identify what workflow setup works for you. Covering how GitHub works is rather out of the scope of this action. |
Beta Was this translation helpful? Give feedback.
That tutorial shows the use of
on: push
. So when the workflow is triggered, the event is alwayspush
. In case of additional events that may trigger it, you may want to differentiate explicitly. I personally like to set it up in a way that building the dists happens first, then those dists are tested and only after that, the publishing happens. In that case, it's useful to have the publishing job skipped when merging to main or running for pull requests. Some people make releases without testing in between and may even rely on a trigger likerelease
, not skipping other jobs.I like using the
workflow_dispatch
trigger tha…