Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,10 @@ jobs:
name: publish-crates
needs: ["create-release", "build-release", "build-release-deb"]
runs-on: ubuntu-latest
environment: release
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -385,10 +389,15 @@ jobs:
exit 1
fi

- name: Authenticate to crates.io via trusted publishing
if: steps.crates_check.outputs.already_published != 'true'
id: crates_auth
uses: rust-lang/crates-io-auth-action@v1

- name: Publish to crates.io
if: steps.crates_check.outputs.already_published != 'true'
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ steps.crates_auth.outputs.token }}
shell: bash
run: |
set -euo pipefail
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
## Fixed
- Cargo publish pipeline now succeeds on crates.io category validation:
- replaced unsupported category slug `datascience` with `science` in `Cargo.toml`.
- Cargo publish workflow now uses crates.io Trusted Publishing (OIDC) in `release.yml`.
- Release reruns for the same tag are now safe:
- `gh release upload` now uses clobber mode in both archive upload jobs.
- `publish-crates` crates.io API checks now include required request headers to avoid 403 responses.
Expand Down