feat: allow downloading unzipped binaries #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi 👋,
I'm quite interested in using this action, or more so the
@extractions/setup-crate
NPM library, to create an action which is able to download binaries which are not gzipped in the release assets. (i.e. catppuccin/whiskers)From looking through the source code, I see that there's a strong assumption that it's always an extract-able directory. In the interest of time, I quickly mocked up an implementation where it's now assumed that if the download doesn't end with
.zip
,.tgz
or.tar.gz
then it is a "naked binary". Then, a temporary directory is created and the downloaded binary is moved into it, allowing the rest of the logic to succeed as normal. I have tested that this implementation works with the existing test suite as demonstrated in my fork's action run.My preferred approach here would be to split out the logic into 2 separate paths (zipped or unzipped) based on the ending of the file, but that would require a much larger refactor and I was already unsure if this type of change would be accepted. I'd appreciate if you could let me know if you're interested in accepting this type of change before I spend more time on it. I'm more than happy to discuss implementation details going forward (the current code needs a bit of tidy up anyways)
Regardless of whether this PR proceeds, thanks for creating this action and the work you've put into it!