File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to crates.io
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ permissions : {}
8+
9+ jobs :
10+ publish-to-crates-io :
11+ name : Publish Rust 🦀 package 📦 to crates.io
12+ runs-on : ubuntu-24.04
13+ environment : cratesio # Optional: for enhanced security
14+ permissions :
15+ id-token : write # Required for OIDC token exchange
16+ contents : read # Required to checkout repository
17+
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
21+ with :
22+ fetch-depth : 0
23+ persist-credentials : false
24+
25+ # - name: Authenticate with registry
26+ # uses: rust-lang/crates-io-auth-action@v1
27+ # id: auth
28+
29+ - name : Publish package 📦 to crates.io
30+ run : cargo publish
31+ env :
32+ CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }} # ${{ steps.auth.outputs.token }}
You can’t perform that action at this time.
0 commit comments