GHA: Add check for main branch for publish to PyPi

This commit is contained in:
Magne Sjaastad
2025-02-24 15:04:18 +01:00
parent 85abd0c51b
commit c944b522c9
+1 -2
View File
@@ -274,8 +274,7 @@ jobs:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
# If this is a tagged release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && github.base_ref == 'refs/heads/main'
steps:
- name: Download python distribution folder
uses: actions/download-artifact@v4