mdbook-svgbob icon indicating copy to clipboard operation
mdbook-svgbob copied to clipboard

Refactor release pipeline

Open jontze opened this issue 1 year ago • 3 comments

This PR refactors mainly the build step of the release pipeline to compile multiple binaries for the most popular targets.

Further, I removed the usage of the actions-rs/* actions, as the github organization is only maintained by one person that doesn't seem to work on this project any more. The actions in this organization are already affected of some deprecations that will break workflows in the next year. And as there is always a recent stable rust version installed on the github runner, there is no need to setup a recent stable rust version manually. actions-rs/toolchain#216

To ensure proper caching I also moved to another popular action in the rust ecosystem that specifically ensures the caching of cargo and rust (https://github.com/Swatinem/rust-cache). So we don't have to mess manually with the cache.

Additionally to the already existing tag, the release workflow now also creates a Github Release with the name of the tag and the compiled binaries for each target platform attached to the release and tag.

As a result, users are now able to download the precompiled binaries of mdbook-svgbob for the most popular target platforms and can get started without going through the compilation process and the installation of cargo / rust. This happens automated for every pushed tag starting with v.

You can see an example of such a release on my fork: https://github.com/jontze/mdbook-svgbob/releases/tag/v0.0.7 I could test everything beside of the windows and macOS binaries and obviously the publishing to crates.io.

If you disagree with some decisions I made, let me know and I'm happy to adjust the workflow :)

jontze avatar Dec 16 '22 14:12 jontze