Skip to content

rust-lang/crates-io-auth-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

crates-io-auth-action

Get a temporary access token to interact with crates.io using trusted publishing.

Usage

This action retrieves a token from crates.io and sets it as an output variable. You can read the token from the action's token output and use it in subsequent steps. The action's post step automatically revokes the token when the job completes.

To learn how to use this action and configure your crates, read the crates.io documentation.

Using a Different Registry URL

If you want to use a different URL than the default https://crates.io, you can specify it in the url input. For example, to use the crates.io staging environment:

- name: Authenticate with custom registry id: auth uses: rust-lang/crates-io-auth-action@v1 with: url: https://staging.crates.io

Sequence Diagram

sequenceDiagram participant GW as GitHub Workflow participant GH as github.com participant CR as crates.io GW->>GH: Request JWT token GH-->>GW: Return JWT token GW->>CR: Send JWT CR-->>GW: Return temporary token GW->>GW: User uses the temporary token in their steps GW->>CR: Revoke temporary token 
Loading

License

This project is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

About

Get a crates.io temporary access token

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 5