Skip to content

publish.yaml: switch to crates.io trusted publishing (OIDC) - #143

Merged
JasoonS merged 1 commit into
mainfrom
jason/hos-2748-switch-hypersync-client-rust-cratesio-publishing-to-trusted
Oct 30, 2026
Merged

JasoonS merged 1 commit into
mainfrom
jason/hos-2748-switch-hypersync-client-rust-cratesio-publishing-to-trusted

Conversation

@JasoonS

@JasoonS JasoonS commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Resolves HOS-2748.

Summary

  • publish.yaml now gets a short-lived crates.io token from rust-lang/crates-io-auth-action, which exchanges a GitHub OIDC token for it. It no longer reads the long-lived CARGO_REGISTRY_TOKEN secret.
  • The job gets id-token: write, and the action is pinned to the v1.0.6 commit SHA, as CodeRabbit suggested on publish.yaml: switch to crates.io trusted publishing (OIDC) #128.
  • This matches how hypersync-client-solana and hyperfuel-client-rust already publish.

Why

The CARGO_REGISTRY_TOKEN secret expired on 2026-10-16, which blocked the hypersync-schema 0.5.0 release. I rotated it today as a stopgap; the new token expires 2027-10-29. With trusted publishing, nothing needs rotating.

crates.io setup (done)

  • hypersync-format, hypersync-schema, hypersync-net-types and hypersync-client each already have a Trusted Publisher entry for enviodev/hypersync-client-rust / publish.yaml with no environment, so this can merge whenever.

After merging

  • Delete the CARGO_REGISTRY_TOKEN repo secret and revoke the github-actions-enviodev-2026-10 crates.io token, once one publish has gone through this flow.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • The package publishing workflow now uses short-lived authentication for registry releases instead of a repository-stored access token.
    • This update is limited to release publishing. It does not change package features, supported workflows, or behavior within the product, and requires no user action. No other user-facing changes are included.

Replace the long-lived CARGO_REGISTRY_TOKEN secret with a short-lived
token minted by rust-lang/crates-io-auth-action (pinned to v1.0.6),
matching hypersync-client-solana and hyperfuel-client-rust.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JasoonS
JasoonS requested a review from JonoPrest October 29, 2026 14:26
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 132d2305-e384-4a01-8802-2445a6e4fe57
Commits

Reviewing files that changed from the base of the PR and between f9aad9c and 67dad34.

Files selected for processing: 1
  • .github/workflows/publish.yaml

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Walkthrough

The publish workflow now grants GitHub OIDC token permission and uses a short-lived token from the crates.io authentication action instead of the CARGO_REGISTRY_TOKEN repository secret.

Changes: Publishing authentication

Layer / File(s) Summary
Configure OIDC publishing authentication
.github/workflows/publish.yaml
The workflow grants id-token: write permission and uses the crates.io authentication action's token output for CARGO_REGISTRY_TOKEN.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Possibly related PRs

Suggested reviewers: ozgrakkurt

Merge Risk: Minimal · up to 67dad

Publishing now uses short-lived credentials. Ensure matching Trusted Publisher entries are configured before release.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: switching the publishing workflow to crates.io Trusted Publishing with OIDC.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@JasoonS
JasoonS merged commit b69f419 into main Oct 30, 2026
7 checks passed
@JasoonS
JasoonS deleted the jason/hos-2748-switch-hypersync-client-rust-cratesio-publishing-to-trusted branch October 30, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants