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

nightly: Fix asset names with nightly as version string #3418

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

JoeKar
Copy link
Collaborator

@JoeKar JoeKar commented Aug 5, 2024

I realized using $VERSION within the archive resp. asset name is counterproductive when used for the nightly upload, because the softprops/action-gh-release will only delete and update assets with the same name present.
Having an updated from e.g. 2.0.14-dev.243 -> 2.0.14-dev.244 -> 2.0.14-dev.245 fills the nightly "release" with all of the assets.
The correction of the nightlies currently needs manual adjustment to be cleaned up.

So I suggest to slightly adapt the tools/cross-compile.sh again to allow a custom string as archive version, if given otherwise use the parsed version. The nightly action then can use tools/cross-compile.sh nightly to provide fixed asset names, which will be properly handled by the softprops/action-gh-release action.
I wasn't able to find an option cleaning up all the assets present at one release.

Side note:
The SHA sum created for the nightlies is only valid till the next build will be done for the same version.

tools/cross-compile.sh Outdated Show resolved Hide resolved
@dmaluka
Copy link
Collaborator

dmaluka commented Aug 7, 2024

The correction of the nightlies currently needs manual adjustment to be cleaned up.

Right now I see only 2.0.14-dev.245 in https://github.com/zyedidia/micro/releases/tag/nightly. Does it mean that you have manually removed all older builds?

@JoeKar
Copy link
Collaborator Author

JoeKar commented Aug 8, 2024

Yes, it does. We had 3 times the nightly assets attached to the nightly release. Before there was any further confusion I cleaned them up.

@dmaluka
Copy link
Collaborator

dmaluka commented Aug 8, 2024

LGTM if there no other easy way to delete old assets automatically (e.g. by customizing softprops/action-gh-release or whatever).

@JoeKar
Copy link
Collaborator Author

JoeKar commented Aug 8, 2024

At least there is no easy AND fast way.

We could create a upstream feature request or fork it and modify softprops/action-gh-release/src/github.ts#L165-L170 by iterating over all the currentAssets depending on an additional configuration switch.
Most probably a PR to the upstream project is then welcome.

But I'm not in a situation to try to improve one more project, since I already lack time to support micro.
So for the moment I feel comfortable with the "workaround".

In case you like to support here we can then (after softprops/action-gh-release includes the feature) simply remove the nightly argument when calling tools/cross-compile.sh in our action and return to the actual situation creating assets with the version in the archive name.

@JoeKar JoeKar merged commit 21bb61c into zyedidia:master Aug 8, 2024
3 checks passed
@JoeKar JoeKar deleted the fix/nightly-assets branch August 8, 2024 16:37
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

Successfully merging this pull request may close these issues.

2 participants