steven-omaha / pacdef

multi-backend declarative package manager for Linux
GNU General Public License v3.0
332 stars 13 forks source link

Release action to build binary #63

Closed thechubbypanda closed 6 months ago

thechubbypanda commented 6 months ago

Action will build binary on release and attach the resulting zip to the release.

Example release

Related Actions run

Part of #58

steven-omaha commented 6 months ago

Thank you, looking good so far!

I have little expertise in Github Actions. From what I can see this built pacdef without any feature flags on Debian against the latest stable musl-based toolchain. It produced an artifact that it attached to the release.

That is a very good start. What would be great to have is that it produces one artifact for every backend that requires a feature flag. At the moment three artifacts would have to be built: one without any flags (which you completed), one for Arch (cargo build --release --features arch), and one for Debian (--features debian). Then the user can download whatever he needs. That would also enable me to easily maintain a pacdef-bin AUR package for Arch.

The reason for the feature flags is that these backends need to be built and linked against a specific version of the package manager.

Is it possible to add this? I think I remember some matrix can be specified to build multiple things with varying configurations.

And it may be reasonable to build on an Arch runner if there is one, for the reason that the latest version of libalpm is probably not available on Debian (required for arch), but the latest apt is available on Arch.

FYI, the Debian backend is currently borked due to a new release of rust-apt. See #64.

thechubbypanda commented 6 months ago

Yep, that makes sense to me, I'll see about matrix'ing the features into different packages and try to build on arch.

thechubbypanda commented 6 months ago

@steven-omaha Any idea what this is about?

The other 2 are building nicely: https://github.com/thechubbypanda/pacdef/releases/tag/0.0.11-alpha

thechubbypanda commented 6 months ago

Fixed, I didn't sync my fork: https://github.com/thechubbypanda/pacdef/releases/tag/0.0.13-alpha and https://github.com/thechubbypanda/pacdef/actions/runs/8470812814

It takes a while to install the arch packages but it's the simplest way to get it done without also maintaining an actions image

steven-omaha commented 6 months ago

Awesome! I will have a look on Saturday, currently I don't have access to a Linux system.

thechubbypanda commented 6 months ago

Should follow your suggested structure now: https://github.com/thechubbypanda/pacdef/releases/tag/0.0.14-alpha

steven-omaha commented 6 months ago

FYI, I'm still testing the new rustup backend that I merged today. Once I'm satisfied this works I will release a new version 1.5.0 where the binaries are distributed as well.