hamcrest / PyHamcrest

Hamcrest matchers for Python
http://hamcrest.org/
Other
766 stars 111 forks source link

The release workflow should only run for tagged releases #240

Closed brunns closed 1 year ago

brunns commented 1 year ago

Is this right? I wouldn't expect this workflow to run for all pushes to main, let alone for pull requests.

offbyone commented 1 year ago

I want this workflow to run against all of them, tbh.

On push to main it publishes to the test PyPi. That's only available to committers.

On PR, though, it runs the hynek/build-and-inspect-python-package@v1 action, which does a bunch of PR-level packaging verification.

You can see a good example of a run here: https://github.com/hamcrest/PyHamcrest/actions/runs/6009538827/job/16299682463?pr=239

Unless you're seeing something I'm not, I'd like to leave this as it was.

brunns commented 1 year ago

Only that I'm getting failures pushing to my fork - as I imagine are others - but that's not the end of the world.

offbyone commented 1 year ago

Oh... that's interesting. I guess I didn't consider that case, since I don't develop on main on my fork.

I'd be interested in a change that limits the later steps to this workflow to only run on the primary repository; we could extend the match check down in the workflow to limit it to hamcrest/PyHamcrest?

brunns commented 1 year ago

Or I could just come to terms with working on branches like a good github citizen. :-)

offbyone commented 1 year ago

Both are valid options, but IMO you're not doing anything wrong by working on main, so I'm more than happy to see the workflow handle that case.

brunns commented 11 months ago

List looks like it might work for us: https://github.com/prisma/prisma/issues/3539#issuecomment-690260573