Closed bonprosoft closed 2 years ago
I may miss some context, but let me ask a question: can we use release
event to trigger the workflow? Release drafter seemingly creates a pre-release, which makes me wonder if it's possible to trigger the release workflow by release
event (with activity == published
that is distinguished from releases created by drafter).
🔗 https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
[updated]
Sorry, I was wrong. To distinguish releases from prereleases, we may need to check github.event.release.prerelease
flag instead of activity.
🔗 https://github.community/t/release-prerelease-action-triggers/17275/2
Thank you for your review, @himkt!
I've updated my PR to use the release
event as you suggest.
release-drafter
creates a release and save it as a draft after a PR is merged, so I don't think we need to distinguish between releases and pre-releases.
There is a limitation that a workflow cannot trigger a new workflow. https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
Currently, a release is created by
release-drafter
, and that's why therelease
workflow wasn't triggered for the0.10.2
tag.As such, I configured the
release
workflow to use theworkflow_dispatch
to publish a new release. I also removedpush.tags
trigger as we can use theworkflow_dispatch
trigger for the manual release as well, but I don't have a strong opinion about that.