crates-trusted-publishing

Automate Rust crate publishing to crates.io via OIDC trusted publishing.

14|1|Updated Dec 29, 2011
One-click install
npx skills add https://github.com/doitian/dotfiles-public --skill crates-trusted-publishing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crates-trusted-publishing
Source: https://github.com/doitian/dotfiles-public/tree/main/ai/local-skills/crates-trusted-publishing
Command: npx skills add https://github.com/doitian/dotfiles-public --skill crates-trusted-publishing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates publishing Rust crates using GitHub Actions with OIDC trusted publishing, eliminating the need for long-lived API tokens and reducing credential risk.

Core Features & Use Cases

  • Setup a release workflow that publishes crates.io artifacts on tagged releases.
  • Support workspace publishing for multi-crate repositories with per-crate publishing.
  • Integrate with crates.io trusted publishing workflows to improve security and rotate credentials automatically.

Quick Start

Create a GitHub Actions workflow at .github/workflows/release.yml that uses crates-io-auth-action to obtain a publish token and runs cargo publish for your crate.

Frequently Asked Questions about crates-trusted-publishing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish Rust crates to crates.io using GitHub Actions OIDC?

Publish Rust crates to crates.io using GitHub Actions OIDC by configuring a trusted publishing workflow that obtains a publish token via the crates-io-auth-action with id-token, then runs cargo publish automatically on tagged releases.

What is trusted publishing for Rust crates and how does it eliminate API tokens?

Trusted publishing for Rust crates uses OIDC-based authentication to issue short-lived publish tokens, eliminating the need to store long-lived crates.io API tokens in GitHub Actions secrets and reducing credential risk.

How do I set up a GitHub Actions workflow to automate Rust crate releases?

Set up a GitHub Actions workflow at .github/workflows/release.yml that uses crates-io-auth-action to obtain an OIDC publish token and runs cargo publish for your crate when a tagged release is created.

Can I publish individual crates from a multi-crate Rust workspace repository?

Yes, trusted publishing supports workspace publishing for multi-crate Rust repositories, enabling per-crate publishing to crates.io so individual packages can be released independently through GitHub Actions.

Do I need crates.io crate ownership to use OIDC trusted publishing?

Yes, OIDC trusted publishing requires crates.io crate ownership, a configured GitHub Actions workflow, and the crates-io-auth-action with id-token enabled to successfully obtain a publish token.

What is the best way to secure Rust crate publishing without long-lived tokens?

The best way to secure Rust crate publishing without long-lived tokens is using OIDC trusted publishing with GitHub Actions, which rotates credentials automatically and issues short-lived tokens via crates-io-auth-action.