Skip to content

Commit 15199df

Browse files
committed
ci: enable trusted publishing
1 parent 7e05854 commit 15199df

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/publish.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ on:
88

99
permissions:
1010
contents: read
11+
id-token: write
1112

1213
jobs:
1314
publish:
1415
name: Publish crate
1516
runs-on: ubuntu-latest
17+
environment: release
1618
steps:
1719
- uses: actions/checkout@v4
1820
- uses: dtolnay/rust-toolchain@stable
@@ -59,9 +61,10 @@ jobs:
5961
run: cargo rustdoc --all-features -- -D missing_docs
6062
- name: Dry run
6163
run: cargo publish --dry-run
62-
# Publishing is intentionally disabled until the release owner configures
63-
# crates.io publishing outside this repository.
64-
# - name: Publish
65-
# env:
66-
# CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
67-
# run: cargo publish --no-verify
64+
- name: Authenticate with crates.io
65+
id: auth
66+
uses: rust-lang/crates-io-auth-action@v1
67+
- name: Publish
68+
env:
69+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
70+
run: cargo publish --no-verify

0 commit comments

Comments
 (0)