Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 2.42 KB

File metadata and controls

53 lines (33 loc) · 2.42 KB

publish-rust-crate

Publishes a Rust crate - by default, to crates.io - with all of its features enabled.

Example

steps:
  - uses: actions/checkout@v4

  - uses: giancosta86/aurora-github/actions/publish-rust-crate@v7
    with:
      cargo-token: ${{ secrets.CARGO_TOKEN }}

Please, note: this action is designed for publication only - not for verification: you may want to use verify-rust-crate for that.

How it works

  1. Run enforce-branch-version, forwarding the enforce-branch-version input to its mode input.

  2. Run publish-github-pages with the optional flag enabled

  3. Run cargo publish, with the --all-features flag

Requirements

  • cargo-token is not mandatory when dry-run is enabled.

  • The requirements for publish-github-pages if website-directory references an existing directory.

  • Before the first publication, running with dry-run set to true is recommended.

Inputs 📥

Name Type Description Default value
dry-run boolean Run a simulated publication via --dry-run false
cargo-token string The secret token for publishing to the registry
document-all-features boolean Enable Rustdoc for all features true
website-directory string Relative directory containing the project website website
enforce-branch-version inject,check,skip How the branch version should be enforced inject
project-directory string The directory containing Cargo.toml .

Further references