no release would get published to TestPyPI as the workflow that would get kicked off from the push event to master (and so NOT a tag event) would fail the "Verify untagged commits have dev versions" step
as it is has github.ref of 'refs/tags/' and so nothing happens at all.
This PR fixes that by just letting pushes to master publish to TestPyPI and then letting the releases publish to PyPI.
Suggested squash and merge commit message:
* Don't run publishing workflow on tag events
- Avoid publishing errors due to 'push' or 'tag' events and checks for tags
* Update pypa/gh-action-pypi-publish action to v1.4.1
(This is a port of https://github.com/scikit-hep/pylhe/pull/45)
With the old workflow if the publishing workflow was run after a new tag was created
no release would get published to TestPyPI as the workflow that would get kicked off from the
push
event tomaster
(and so NOT atag
event) would fail the "Verify untagged commits have dev versions" stephttps://github.com/dguest/pandamonium/blob/3bcfd36525681fe56dc6dafee84a5f072533c833/.github/workflows/publish-package.yml#L37-L54
as it would
https://github.com/dguest/pandamonium/blob/3bcfd36525681fe56dc6dafee84a5f072533c833/.github/workflows/publish-package.yml#L38
but then also
"${wheel_name}" != *"dev"*
given that it comes from a tag. So nothing gets published.Similarly, the workflow that would get kicked off from the
tag
event will just run though but will passhttps://github.com/dguest/pandamonium/blob/3bcfd36525681fe56dc6dafee84a5f072533c833/.github/workflows/publish-package.yml#L68-L74
as it is has
github.ref
of'refs/tags/'
and so nothing happens at all.This PR fixes that by just letting pushes to
master
publish to TestPyPI and then letting the releases publish to PyPI.Suggested squash and merge commit message: