Skip to content

Commit a47d94d

Browse files
committed
Configure trusted publishing to crates.io
1 parent 1e625cd commit a47d94d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,17 @@ jobs:
323323
if: ${{ startsWith(github.ref, 'refs/tags/juniper') }}
324324
needs: ["release-github"]
325325
runs-on: ubuntu-latest
326+
permissions:
327+
id-token: write
326328
steps:
327329
- uses: actions/checkout@v6
328330
- uses: dtolnay/rust-toolchain@v1
329331
with:
330332
toolchain: stable
331333

334+
- uses: rust-lang/crates-io-auth-action@v1
335+
id: auth
336+
332337
- name: Parse crate name and version from Git tag
333338
id: tag
334339
uses: actions-ecosystem/action-regex-match@v2
@@ -338,7 +343,7 @@ jobs:
338343

339344
- run: cargo publish -p ${{ steps.tag.outputs.group2 }} --all-features
340345
env:
341-
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATESIO_TOKEN }}
346+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
342347

343348
release-check:
344349
name: check (release)

0 commit comments

Comments
 (0)