pyhf icon indicating copy to clipboard operation
pyhf copied to clipboard

Add pre-release support to publish workflow

Open matthewfeickert opened this issue 3 years ago • 1 comments

Creating the GitHub pre-release v0.7.0rc1 should have triggered the publish to PyPI workflow, but it didn't. I don't think that there is a pre_release github.event_name

https://github.com/scikit-hep/pyhf/blob/acde7f4ff8d0db2351f5d6e31ff5584e34da0cf0/.github/workflows/publish-package.yml#L104-L105

so we'll need to figure out how release candidate pre-releases can get integrated in.

matthewfeickert avatar Jun 29 '22 16:06 matthewfeickert

So seems that I need to learn the github.event API better as there is apparently a github.event.release.prerelease. So I now don't know how github.event_name and github.event.release's attributes differ.

edit Under https://docs.github.com/en/rest/releases/releases#create-a-release there is

prerelease boolean true to identify the release as a prerelease. false to identify the release as a full release. Default: false

Thought this seems to imply that a prerelease is not a published event.action(?).

matthewfeickert avatar Jun 30 '22 04:06 matthewfeickert

I think https://github.com/orgs/community/discussions/26281#discussioncomment-3251177 is how to do this.

matthewfeickert avatar Aug 28 '22 20:08 matthewfeickert