Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,20 @@ jobs:
needs: [crate, wheels, pypi]
if: startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'IntelliStream-DataHub'
environment: release
# Job-level permissions replace the workflow's `contents: read` wholesale, so it is repeated
# here alongside the OIDC claim the auth action needs; without it `checkout` has no scope.
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
# Trades this run's OIDC identity for a crates.io token scoped to this crate and revoked in
# the action's post step, so no long-lived credential exists to leak or to expire. Requires
# a Trusted Publisher registered on the crate naming this repository, workflow and
# environment; crates.io only accepts one on a crate that already has a published version,
# which is why this could not be set up before 0.2.0 went out.
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}