Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix github release pipeline #17

Open
Tiim opened this issue Oct 27, 2023 · 4 comments
Open

Fix github release pipeline #17

Tiim opened this issue Oct 27, 2023 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Tiim
Copy link
Owner

Tiim commented Oct 27, 2023

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 Tiim added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Oct 27, 2023
@nmay231
Copy link

nmay231 commented Dec 20, 2023

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.

@Tiim
Copy link
Owner Author

Tiim commented Dec 28, 2023

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

@nmay231
Copy link

nmay231 commented Dec 30, 2023

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. 😀

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

@Tiim
Copy link
Owner Author

Tiim commented Dec 30, 2023

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 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants