Skip to content

Commit 13c6da1

Browse files
committed
Replace publishing workflow
1 parent 7893992 commit 13c6da1

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,16 @@ on:
55
types: published
66
workflow_dispatch:
77

8-
permissions:
9-
id-token: write # Required for GitHub to authenticate with crates.io
10-
contents: read
11-
128
jobs:
139
publish:
14-
name: Publish all crates in workspace
1510
runs-on: ubuntu-latest
16-
11+
environment: release # Optional: for enhanced security
12+
permissions:
13+
id-token: write # Required for OIDC token exchange
1714
steps:
18-
- name: Checkout repository
19-
uses: actions/checkout@v4
20-
21-
- name: Set up Rust
22-
uses: dtolnay/[email protected]
23-
24-
- name: Publish Workspace
25-
uses: crates-io/action@v1
26-
with:
27-
publish: true
15+
- uses: actions/checkout@v4
16+
- uses: rust-lang/crates-io-auth-action@v1
17+
id: auth
18+
- run: cargo publish
19+
env:
20+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

0 commit comments

Comments
 (0)