Skip to content

ci: add crates.io publish workflow #206

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

epilys
Copy link
Member

@epilys epilys commented Jul 14, 2025

Add a trusted publishing workflow for crates.io. It will be triggered everytime there's a push of a tag starting with v.

The workflow must be manually added to crates.io:

Configuring Trusted Publishing

Configure your crate on crates.io:

Go to your crate's Settings → Trusted Publishing
Click the "Add" button and fill in:
    Repository owner: Your GitHub username or organization
    Repository name: The name of your repository
    Workflow filename: The filename of your GitHub Actions workflow (e.g., "release.yml")
    Environment: Optional environment name if you're using GitHub environments
Save the configuration

Documentation: https://crates.io/docs/trusted-publishing

cc @roypat

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

Add a trusted publishing workflow for crates.io. It will be triggered
everytime there's a push of a tag starting with `v`.

The workflow must be manually added to crates.io:

> Configuring Trusted Publishing
>
> Configure your crate on crates.io:
>
>     Go to your crate's Settings → Trusted Publishing
>     Click the "Add" button and fill in:
>         Repository owner: Your GitHub username or organization
>         Repository name: The name of your repository
>         Workflow filename: The filename of your GitHub Actions workflow (e.g., "release.yml")
>         Environment: Optional environment name if you're using GitHub environments
>     Save the configuration

Documentation: https://crates.io/docs/trusted-publishing

Signed-off-by: Manos Pitsidianakis <[email protected]>
Copy link
Member

@roypat roypat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've registered this workflow as a trusted publisher on crates.io, so I guess once we merge this we can give it a try with the 0.14 release that I'm suspecting cloudhypervisor will want soon for cloud-hypervisor/cloud-hypervisor#7117 (comment)

@epilys
Copy link
Member Author

epilys commented Jul 16, 2025

@roypat sounds good. Feel free to merge whenever it's necessary!

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.

4 participants