Currently, this action attempts to create a new release with assets and falls back to uploading to an existing release. Even if the call to gh release create fails, GitHub creates a draft release with assets attached.
Example
In [gabe565/gh-profile](https://github.com/gabe565/gh-profile), I created release v1.1.0 in the web UI. The action runs and logs the following:
![image](https://user-images.githubusercontent.com/7717888/196491612-24eee3f2-730e-46f8-8d65-6da57a864e35.png)
But a draft release is created:
![image](https://user-images.githubusercontent.com/7717888/196491642-c2dc957c-e8fe-4dfe-9c1a-0dadd37940b9.png)
This PR modifies this behavior by checking if a release exists first. If it does, gh release upload is called. Else, gh release create is called.
Currently, this action attempts to create a new release with assets and falls back to uploading to an existing release. Even if the call to
gh release create
fails, GitHub creates a draft release with assets attached.Example
In [gabe565/gh-profile](https://github.com/gabe565/gh-profile), I created release v1.1.0 in the web UI. The action runs and logs the following: ![image](https://user-images.githubusercontent.com/7717888/196491612-24eee3f2-730e-46f8-8d65-6da57a864e35.png) But a draft release is created: ![image](https://user-images.githubusercontent.com/7717888/196491642-c2dc957c-e8fe-4dfe-9c1a-0dadd37940b9.png)This PR modifies this behavior by checking if a release exists first. If it does,
gh release upload
is called. Else,gh release create
is called.