Skip to content

Commit 8c61423

Browse files
lwshangclaude
andauthored
ci: add publish workflow for trusted publishing to crates.io (#477)
## Summary - Add a `workflow_dispatch` workflow to publish Rust crates to crates.io using OIDC-based trusted publishing (`crates-io-auth-action`) - Publishes 7 crates in dependency order: `ic-certification`, `ic-representation-independent-hash`, `ic-cbor`, `ic-http-certification`, `ic-certificate-verification`, `ic-asset-certification`, `ic-response-verification` - Modeled after [dfinity/agent-rs publish.yml](https://github.com/dfinity/agent-rs/blob/main/.github/workflows/publish.yml) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 48bd027 commit 8c61423

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish to crates.io
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
publish-crates:
6+
runs-on: ubuntu-latest
7+
permissions:
8+
id-token: write
9+
steps:
10+
- uses: actions/checkout@v6
11+
- uses: rust-lang/crates-io-auth-action@v1
12+
id: auth
13+
- run: |
14+
cargo publish -p ic-certification
15+
cargo publish -p ic-representation-independent-hash
16+
cargo publish -p ic-cbor
17+
cargo publish -p ic-http-certification
18+
cargo publish -p ic-certificate-verification
19+
cargo publish -p ic-asset-certification
20+
cargo publish -p ic-response-verification
21+
env:
22+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

0 commit comments

Comments
 (0)