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

Refactor release pipeline #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jontze
Copy link

@jontze jontze commented Dec 16, 2022

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 :)

This refactors mainly the building step of the release
pipeline to compile multiple binaries for certain 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. So it was required to move to
other actions to setup rust anyways.

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.

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 most popular target platforms and can get started
without going through the compilation process and the installation of
cargo / rust.
@boozook boozook self-requested a review December 20, 2022 20:03
@jontze
Copy link
Author

jontze commented Jan 10, 2023

Thanks for your feedback @mgeisler! I pushed a commit addressing it. I'll squash the fixup after approval @boozook

EDIT: For some reason github automatically removed the requested review from @boozook 🤷

@jontze jontze requested review from mgeisler and removed request for boozook January 10, 2023 19:05
@boozook
Copy link
Owner

boozook commented Aug 3, 2023

Also do not forget to add secrets.CARGO_REGISTRY_TOKEN, @mgeisler. I hope you have rights for it. If not - feel free to reach me.

@boozook
Copy link
Owner

boozook commented Aug 3, 2023

Okay, I've just added my token CARGO_REGISTRY_TOKEN. Should works.
Screenshot 2023-08-03 at 10 50 08

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.

3 participants