since Github Releases are actually a Git Tags, I want to auto-upgrade my package.json
version when there is a new Release (and tag), with Github Action.
I know I need to trigger a job
on: release
, but according to Github Actions docs I don't know if I need to trigger when created
, published
, both or all?
Github says:
Note: The
release
event is not triggered fordraft
releases.
And I created two pipelines: one on: release, type: created
and one on: release, type: published
.
Then I created a draft
release, and then I published it.
Only the published
pipeline triggered, and it was when I published the release.
My experience has been the opposite of what was described here on the forum. When tested:
/releases
page, both events will trigger, as the release goes from state "draft" to "published".release-it
, bypassing "draft" stage and becoming "published" directly, only release:published
will triggerSo apparently a release can be published without being created. Weird indeed. I'd go with published
.