-
-
Notifications
You must be signed in to change notification settings - Fork 849
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
Publish CLI binaries for cargo-binstall #1358
Conversation
this resolves #1331 |
I found a simpler approach that uses the upload-rust-binary-action, which is from the same dev as the install-action mentioned above. This can handle the build and upload in a single action. I tried to add support for ARM Mac binaries as well but ran into a cross-compilation issue due to git2-rs's dependency on system installations of openssl (see rust-lang/git2-rs#623 for more info). It looks like GitHub is adding support for ARM Mac runners by the end of the year though, so we can add support for those then. |
I've also updated the toolchain install step to use a new action as the actions-rs organization and repos appear to be unmaintained since 2020. I've opened another issue #1360 to track replacing the action in the other pipelines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! This should make the docsite builds a lot shorter
Thank you!
Summary
This PR adds a workflow that will run on every new release to generate binaries of the CLI for Windows, Linux, and macOS. It will then upload these binaries to the release, along with a SHA. This also adds new metadata to the dioxus-cli crate so that cargo-binstall can find the published artifacts.
Reason
The goal of this PR is to publish binaries that can be used in downstream partners' GitHub Actions workflows. By using the install-action, which uses cargo-binstall under the hood, developers can quickly install the latest CLI binary.
Here's a shorthand for installing the CLI using that action:
Caveats
Note that I have not tested the install via cargo-binstall yet as I do not have permissions to publish a new version of the package, though I have tested that it publishes the binaries to the GitHub Release.