Add id input to support publish updates #357
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's currently not possible to publish a release (update
draft
fromtrue
tofalse
) through this action. That's because the action can only locate a draft Release to update if it iterates over them all, and it only does that ifdraft
istrue
, which means it can't also befalse
to perform the desired update.To get around this, I added an
id
input and used that to find the existing release when given. This means you can pass the output of running the action once (to create the release) as an input to running the action again (to publish it) and it will be found and updated correctly.I also made it possible to omit
tag_name
whenid
is given, and re-use the existing release's. This makes so everything is optional if you're trying to update an existing release byid
, which ensures you can update what you want and retain all other values as whatever they were.