upload-rust-binary-action icon indicating copy to clipboard operation
upload-rust-binary-action copied to clipboard

Support more archive formats

Open taiki-e opened this issue 3 years ago • 9 comments

  • [ ] tar.xz
  • [ ] tar.bz2
  • [ ] no archive
  • [ ] upx (https://github.com/taiki-e/upload-rust-binary-action/issues/54)

taiki-e avatar Jul 27 '21 12:07 taiki-e

No archive would be awesome :)

joepio avatar Aug 14 '21 10:08 joepio

No archive would be awesome :)

Seconded! My use case is that I want the user to be able to run a very portable sh install.sh that fetches binaries, and I don't want to make any assumptions about what archive tools they have installed.

samtay avatar May 05 '23 21:05 samtay

Supporting upx will enable shipping really consise binaries.

damooo avatar Nov 11 '23 13:11 damooo

Supporting DMG on macOS would be nice (especially as DMGs support stapling the notarization)

create-dmg might be helpful for this…

matiaskorhonen avatar Aug 14 '24 15:08 matiaskorhonen

Btw, "no archive" is not yet officially supported (https://github.com/taiki-e/upload-rust-binary-action/issues/6 is tracking issue for it), but it is considered possible to work around that limitation by using the asset option.

taiki-e avatar Sep 03 '24 07:09 taiki-e

I think there are two possible APIs here.

One is to deprecate the existing tar option and add a tar-gz option which means the same thing, and then will add options such as:

with:
  tar-gz: unix     # .tar.gz (alias: tar, default: unix)
  tar-bz2: none    # .tar.bz2 (default: none)
  tar-xz: none     # .tar.xz (default: none)
  zip: windows     # .zip (default: windows)
  no-archive: none # binary with no archive (default: none)
  dmg: none        # .dmg (default: none)
  deb: none        # .deb (default: none)
  upx: none        # upx (default: none)
  # etc...

This should be consistent with existing APIs and very easy to add implementations.

The second is to add an option for comprehensive file formatting. Something like:

with:
  format: tar.gz, tar.bz2, tar.xz, zip, no-archive # etc...

This is not consistent with existing APIs and would likely need to be made mutually exclusive.

I don't have a strong opinion on which one to adopt, and was going to discuss it with who said they were interested in working on this issue, but since no one seems to be interested in working on this issue, I'll just leave the idea here.

taiki-e avatar Sep 03 '24 08:09 taiki-e

If there are breaking changes coming, one thing I'd quite like to see is more granularity for the archive selection.

For example, I'd like to have be able to select zip for Windows and Mac but tar.gz for linux. Or zip for Windows, dmg for Mac, and tar.gz for linux.

matiaskorhonen avatar Sep 03 '24 08:09 matiaskorhonen

@matiaskorhonen

Unless we change the defaults, adding variants other than unix and windows doesn't break anything in particular. For example, even if we add the variants linux and macos, we can implement the variant unix to mean linux,macos,freebsd,etc., as-is.

Or do you want a completely different API?

taiki-e avatar Sep 03 '24 09:09 taiki-e

Ah, I'd have no problem if that could be accomplished with the existing API. I just assumed that it would cause some breakage…

matiaskorhonen avatar Sep 03 '24 17:09 matiaskorhonen