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

Delete old release and create new release before uploading to it #15

Open
probonopd opened this issue May 1, 2022 · 5 comments
Open

Comments

@probonopd
Copy link
Owner

probonopd commented May 1, 2022

Currently, https://github.com/probonopd/static-tools/releases/tag/continuous shows eda9edf even though the files attached to it are from newer commits.

We need to

  • Check whether the continuous release belongs to the same sha commit as what we are currently building
  • If not, then we need to delete the old continuous release and create a new one before we start uploading to it
  • The above should only be done once we know that the build succeeded up to the point where we want to upload

@Tachi107 do you know how to do this?

@Tachi107
Copy link
Contributor

Tachi107 commented May 1, 2022

As the jobs run in parallel, I think that this could be hard to coordinate. Would it be simpler to tell the other tools to look for https://github.com/probonopd/static-tools/releases/latest instead of https://github.com/probonopd/static-tools/releases/tag/continuous?

@probonopd
Copy link
Owner Author

As the jobs run in parallel, I think that this could be hard to coordinate.

Why? If we delete the old and make a new release when the sha of the release doesn't match the sha of the currently running build, then only the first of the running builds will trigger the re-creation of the release. Because for the other builds, the sha will match.

@Tachi107
Copy link
Contributor

Tachi107 commented May 1, 2022

What if two builds try to delete the release at the same time? Or what if one deletes the release and starts uploading the artifacts, and then another job deletes the newly created release because the API has returned cached results?

@probonopd
Copy link
Owner Author

Apparently this is the way how to do it:

https://github.com/AppImage/AppImageUpdate/blob/main/.github/workflows/main.yml

  • Upload to GitHub Artifacts
  • Then, download from GitHub Artifacts and create a new release and upload the artifacts there

it then looks like this:

image

@Tachi107
Copy link
Contributor

Tachi107 commented Jun 7, 2022

NooDS uses this simple job: https://github.com/Hydr8gon/NooDS/blob/2e09bf6ab39e205c692229fe14f540774a8a94bd/.github/workflows/autobuild.yml#L131-L154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants