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

Add Cargo package metadata for publishing to crates.io #3

Merged
merged 2 commits into from
Jan 21, 2024

Conversation

nukopy
Copy link
Owner

@nukopy nukopy commented Jan 21, 2024

Why

On GitHub Actions workflow "Release", the following error occurs on publishing to crates.io:

Run cargo publish --token ***
    Updating crates.io index
warning: manifest has no description, license, license-file, documentation, homepage or repository.
See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
   Packaging knsh v0.0.2 (/home/runner/work/knsh/knsh)
   Verifying knsh v0.0.2 (/home/runner/work/knsh/knsh)
   Compiling knsh v0.0.2 (/home/runner/work/knsh/knsh/target/package/knsh-0.0.2)
    Finished dev [unoptimized + debuginfo] target(s) in 0.81s
    Packaged 13 files, 8.6KiB (3.8KiB compressed)
   Uploading knsh v0.0.2 (/home/runner/work/knsh/knsh)
error: failed to publish to registry at https://crates.io

Caused by:
  the remote server responded with an error: missing or empty metadata fields: description, license. Please see https://doc.rust-lang.org/cargo/reference/manifest.html for more information on configuring these fields
Error: Process completed with exit code 101.

The error message referred to the Cargo documentation, which indicated that the following metadata in the Cargo.toml file is required for publishing to crates.io:

  • license or license-file
  • description
  • homepage
  • documentation
  • repository
  • readme

What

  • Add Cargo package metadata to Cargo.toml

@nukopy nukopy changed the title fix(ci): Add Cargo package metadata for publishing to crates.io Add Cargo package metadata for publishing to crates.io Jan 21, 2024
@nukopy nukopy merged commit 6daf7ff into main Jan 21, 2024
8 checks passed
@nukopy nukopy deleted the add-cargo-package-metadata-for-publishing-to-cratesio branch January 21, 2024 16:30
@github-actions github-actions bot mentioned this pull request Jan 21, 2024
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.

1 participant