Skip to content

Release / Prerelease action triggers #26281

Answered by Yanjingzhu
wstyres asked this question in Actions
Discussion options

You must be logged in to vote

There is not a released type for release event, if use published instead,  when create a pre-released version, we also need to publish it. So published type workflow will be trigged both Pre-Release and actual releases.

As a work around, in published type workflow,  you could add if condition to filter pre-release attribute. If it equals false , then run the job. If is true, then skip the job.

if: "!github.event.release.prerelease"

For example:

I need to mention that this work around could not stop workflow to be triggered, just stop the job to run. When a pre-release published, both two workflows are triggered, but the job in Upload Release will be skip…

Replies: 6 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Andre601
Comment options

Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment