Skip to content

utils/crates-io: integration with trusted publishing #5614

Open

Description

@StackOverflowExcept1on

Problem

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

We'd like to publish crate updates not from the GitHub owner, but from GitHub Actions. This is a more trusted option for distributing our packages.
Image

Proposed solution

However, this is not such an easy task since we have quite a lot of crates and 30 minutes will not be enough for us due to possible rate limits. So, a hybrid approach is needed. The crate owner can likely publish version 0.0.0 for new crates and the add GitHub team to owners, while trusted publishing is used when updating existing packages.

Tokens automatically expire after 30 minutes

Your crate must already be published to crates.io (initial publish requires an API token)

https://github.com/rust-lang/crates.io/blob/main/src/controllers/trustpub/tokens/exchange/mod.rs#L229

Alternatives

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: backlogLow priority, can be addressed latertype: featNew functionality or user-visible improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions