upload-release-action icon indicating copy to clipboard operation
upload-release-action copied to clipboard

Add draft release support

Open svenstaro opened this issue 4 years ago • 6 comments

I had originally put this in and then removed it again as at https://github.com/svenstaro/upload-release-action/commit/1daf68639d5e4ffe0cd591010d871920f963c8a4

The reason was that draft releases don't support getting by tag via API as draft releases don't create tags.

These folks over here had the exact same problem and solved it in a different fashion: https://github.com/electron-userland/electron-builder/blob/7b335dbd7e5ca754598ca93318be1404fc518485/packages/electron-publish/src/gitHubPublisher.ts#L91

svenstaro avatar Jul 05 '20 11:07 svenstaro

Sweet! Can't wait to use this. thnx

ruudboon avatar Jul 06 '20 18:07 ruudboon

I used this action successfully on draft releases.

Happypig375 avatar Jul 29 '20 14:07 Happypig375

Here: https://github.com/Happypig375/github-actions-for-packages/blob/67a80bfb1baf1745dfee26d739ee86e9fdffe414/.github/workflows/Release%20Drafter.yml

Happypig375 avatar Jul 29 '20 14:07 Happypig375

I tried this the way Happypig is suggestion but it does not seem to work for me.. I end up with a duplicate release

incorvia avatar Apr 23 '21 17:04 incorvia

@svenstaro I actually found this because I'm using release-drafter as well, but I'm a bit confused about whether upload-release-action is just for uploading files to a release (the title says "Upload files to a GitHub release") or if it's actually creating the release as well.

If it's the latter, could that be clarified in the README?

Also, if it does create a release as well, is there a way to disable that so I can just upload an asset to the release draft created by release-drafter?

andrewbanchich avatar Jun 21 '21 21:06 andrewbanchich

@andrewbanchich in my testing it seems to create the release for the given tag if it doesn't exist yet, and otherwise just uses the existing release (probably only makes sense if "overwrite" is true).

triplef avatar Sep 11 '21 09:09 triplef

@svenstaro any progress on this one?

I’m guessing this hasn’t been implemented yet (I see that #38 is open but seems abandoned), but I wanted to check and be sure.

Extremely grateful for this useful action and been using it for a long time! Yet, for my use case sometimes I’d really prefer to be able to upload assets to draft releases.

gerlero avatar May 19 '23 02:05 gerlero

I haven't had time to work on this but I actively maintain the project at least so if you feel like making a contributions there's a good chance we could merge it quickly.

svenstaro avatar May 23 '23 20:05 svenstaro

Thanks. I haven't played around very much with how releases show up and work with the GitHub API, but I might take a shot at it in the future.

I did some extra digging a few days back after my post and saw that unfortunately the release event doesn't trigger at all for draft releases, which makes this feature less useful (not totally pointless, but I assume one would need to push a tag to trigger the creation of the draft release...)

Anyway, thanks again for developing the package and keeping it maintained!

gerlero avatar May 23 '23 22:05 gerlero