ncipollo / release-action

An action which manages a github release

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`artifactErrorsFailBuild` doesn't seem to actually not create release

samip5 opened this issue · comments

Describe the bug
When the action fails to match to any files, I think the artifactErrorsFailBuild being true should prevent an release being created but that's not the case.

To Reproduce
Steps to reproduce the behavior:

  1. Use the workflow with something that generates an artifact
  2. The artifact generation step for whatever reason fails
  3. The release is created despite an error with matching any files
  4. See error

Expected behavior
I would have expected it to not create a release as told to when that flag is true.

Screenshots
image

Additional context
https://github.com/samipsolutions/vyos-build/actions/runs/6687837787/job/18169035562 (I have already manually deleted the release)

The release must be created to try and upload artifacts to it, so it will already exist before we could have failed. If you want to prevent the release from existing if the artifacts don't exist that should be done as a separate step in the workflow.

The intent of this input is really to provide signal that this failed so then you can decide what to do with the release (delete it, manually upload asset, delete tag, etc). While the action could delete the release when this happens I actually don't think that would be the right thing to do in some cases since it will leave you in a funky state (for example if the workflow is triggered based upon a tag push).