Use trusted publishing for release automation in this repository #2281
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit updates the publish scripts and CI configuration to use the "Trusted Publishing" workflow on crates.io. This enables removal of the long-lived token assigned to this repository in favor of short-lived ephemeral tokens scoped to just the
publish.ymlworkflow.Here CI configuration is updated to avoid using the token in the environment. Instead it uses
rust-lang/crates-io-auth-action@v1to acquire a token during publishing. Documentation is added for how to add a crate to this repository as it now requires that the crate is published on crates.io before it's added to this repository. That ensures that the trusted publishing workflow is in place before a PR is merged. Finally thepublish.rsscript is updated to avoid owner management on version bumps but also check on PRs that the owners are configured correctly.