diff --git a/conda_smithy/templates/github-actions.yml.tmpl b/conda_smithy/templates/github-actions.yml.tmpl index bc4d25224..0bf0566a4 100644 --- a/conda_smithy/templates/github-actions.yml.tmpl +++ b/conda_smithy/templates/github-actions.yml.tmpl @@ -11,7 +11,16 @@ {%- endfor %} name: Build conda package -on: {{ github_actions.triggers }} +on: +{%- for trigger in github_actions.triggers %} +{%- if trigger == "push" and upload_on_branch %} + push: + branches: + - {{ upload_on_branch }} +{%- else %} + {{ trigger }}: +{%- endif %} +{% endfor %} {%- if github_actions.cancel_in_progress %} concurrency: diff --git a/news/upload_gha.rst b/news/upload_gha.rst new file mode 100644 index 000000000..2caa45a55 --- /dev/null +++ b/news/upload_gha.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* When upload_on_branch is set, GHA is triggered only for that branch (#1687). + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +*