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.
Types of actions. You can build Docker container and JavaScript actions.
From Official GitHub: Releases are GitHub's way of packaging and providing software to your users. You can think of it as a replacement to using downloads to provide software. With Releases, you can provide links to binary files, as well as release notes describing your changes.
This is a GitHub Actions that automates the release of GitHub Actions . If there is release which has same tag name and has been published, re-publish it (Because if the tag is changed, the release will be in a draft state).
This action triggers another GitHub Actions workflow, using the workflow_dispatch event. The workflow must be configured for this event type e.g. on: [workflow_dispatch] This allows you to chain workflows, the classic use case is have a CI build workflow, trigger a CD release/deploy workflow when it completes.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With