-
Notifications
You must be signed in to change notification settings - Fork 10
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
jontze
wants to merge
2
commits into
boozook:master
Choose a base branch
from
jontze:chore/refacor-release-CI
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
mgeisler
reviewed
Jan 5, 2023
mgeisler
reviewed
Jan 5, 2023
2 tasks
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 withv
.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 :)