Skip to content

Commit 2ecdc62

Browse files
authored
Update rust workflow to use trusted publishing (#280)
1 parent 70885d1 commit 2ecdc62

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/rust.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,14 @@ jobs:
156156
env:
157157
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
158158

159+
- uses: rust-lang/crates-io-auth-action@v1
160+
if: env.RELEASE == 'true'
161+
id: auth
162+
159163
- name: Publish to crates.io
160164
if: env.RELEASE == 'true'
161165
env:
162-
CARGO_REGISTRY_TOKEN: ${{ secrets.cargo_registry_token }}
166+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
163167
# See comment above for why `--allow-dirty` is used.
164168
run: |
165169
cp -r src rust_bindings/cpp

0 commit comments

Comments
 (0)