Skip to content

Commit 839f6b4

Browse files
cgwaltersckyrouac
authored andcommitted
ci: Add trusted-publishing workflow for crates.io releases
Synchronize the trusted-publishing workflow from: https://github.com/bootc-dev/containers-image-proxy-rs This enables automated publishing to crates.io when version tags (v*) are pushed, using OIDC-based authentication via rust-lang/crates-io-auth-action. Assisted-by: OpenCode (Claude Opus 4.5) Signed-off-by: Colin Walters <walters@verbum.org>
1 parent 420b097 commit 839f6b4

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# See https://crates.io/docs/trusted-publishing
2+
name: Publish to crates.io
3+
on:
4+
push:
5+
tags: ['v*'] # Triggers when pushing tags starting with 'v'
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-24.04
9+
permissions:
10+
id-token: write # Required for OIDC token exchange
11+
steps:
12+
- uses: actions/checkout@v6
13+
- uses: rust-lang/crates-io-auth-action@v1
14+
id: auth
15+
- run: cargo publish
16+
env:
17+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

0 commit comments

Comments
 (0)