Android-Markdown-Widget icon indicating copy to clipboard operation
Android-Markdown-Widget copied to clipboard

Fix github release pipeline

Open Tiim opened this issue 2 years ago • 4 comments

There are two ways to create a new release: 1) creating a new tag in the git cli and pushing it and 2) using the github ui to create a new release, which also creates a new tag.

  1. works and is tested.
  2. does not work. The github action tries to create a new release but fails because the release with that tag already exists.

Fix: use a github action to upload the assets to the release which supports modifying a release if it already exists.

Tiim avatar Oct 27 '23 06:10 Tiim

I'm affected by #14 and was hoping to install the version with the fix from #15 without resorting to recompiling it myself. Would you mind deleting the pre-release and trying it again using the github ui?

If it fails again, you can copy the error here or search for the solution online to see if someone resolved it recently. I noticed this issue seemed to be the closest to the problem you might have, but I can't verify that since I can't see the error logs. I also request that you delete the tag again and push the tag up locally so I can download the latest version in the meantime. Thanks :)

If it doesn't fail, then problem solved... Hopefully...

EDIT: Also, I wasn't able to find the 0.1.5-pre.1 release on F-Droid's website for whatever reason. I don't know if that's because F-Droid uses GitHub releases, or if it doesn't release pre-releases by default, or something else.

nmay231 avatar Dec 20 '23 05:12 nmay231

Manually pushed the update for version 1.5. This will do for now but for the future we need a more robust solution.

Tiim avatar Dec 28 '23 13:12 Tiim

Thanks for doing that.

I was able to reproduce the issue on a test repo (I got Validation Failed: {"resource":"Release","code":"already_exists","field":"tag_name"}).

I was able to work around the issue by deleting the existing release on the releases tab, and then rerunning the action manually on the tag that still remained.

Obviously, this is not ideal. I looked into the marvinpinto/action-automatic-releases project. The mirror that your workflow uses (https://github.com/marvinpinto/action-automatic-releases) is an old one with the latest commit around a year ago and the project itself (https://github.com/marvinpinto/actions) is 6 months at the latest with ~40 PRs open. While the actual source has the fix for this issue, a comment mentions you have to build the action from the latest version yourself and use that instead of the version currently available.

I would recommend looking for a different action that does something similar. I would recommend one myself, but I'm kinda new to what's out there in the github actions space; your guess is as good as mine. :grinning:

But in any case, happy New Year's Eve Eve Eve (Eve?) :tada:

nmay231 avatar Dec 30 '23 05:12 nmay231

Thanks for the research! ✨ I will eventually switch to a different GitHub action to do the releases unless anyone wants to contribute earlier :)

The official GitHub actions for releases (actions/create-release, actions/upload-release-asset) are deprecated but reference the following github action: softprops/action-gh-release

This action seems to do everything we need. I would be glad to accept a pull request 😉

Tiim avatar Dec 30 '23 09:12 Tiim