Skip to content

Pre-publish polish: repo URL, docs.rs metadata, release pipeline, badges#4

Merged
JosiahBull merged 4 commits into
mainfrom
brian/release-pipeline-and-publish-prep
May 20, 2026
Merged

Pre-publish polish: repo URL, docs.rs metadata, release pipeline, badges#4
JosiahBull merged 4 commits into
mainfrom
brian/release-pipeline-and-publish-prep

Conversation

@hardbyte
Copy link
Copy Markdown
Contributor

@hardbyte hardbyte commented May 20, 2026

Pre-publish polish ahead of v0.3.0 on crates.io and npm. Metadata, workflow, and README only — no library code touched.

What

  • Fix workspace.package.repository — set to thepartly/partly-proxy (currently lands on thepartly/api-proxy, which 404s). crates.io and docs.rs link this verbatim.
  • [package.metadata.docs.rs] on all 4 publishable cratesall-features = true + rustdoc-args = ["--cfg", "docsrs"]. Without it, docs.rs builds with default features only (hiding storage-sqlite on the lib, the testing conformance suite on partly-proxy-types, etc.). The --cfg docsrs flag is set so future #[cfg_attr(docsrs, doc_cfg(...))] annotations render feature gates inline in rustdoc — no source change needed to land that later.
  • .github/workflows/release.yml — tag-triggered (v*), four jobs: version-check → (publish-cratespublish-npm) → github-release. Both registry publishes use OIDC Trusted Publishing — no long-lived CARGO_REGISTRY_TOKEN or NPM_TOKEN secret.
    • crates.io: rust-lang/crates-io-auth-action@v1, publishes in dep order (types → storage-jsonl → storage-sqlite → lib) with 30s waits for sparse-index propagation.
    • npm: npm publish --provenance --access public for @partly/proxy-client (GA Aug 2025).
    • version-check verifies the tag against workspace.package.version, every member crate manifest, and ts-client/package.json — catches drift from a cargo release mid-failure or a hand-edit that shared-version = true can't enforce.
    • github-release runs only after both publishes succeed, so the release page never advertises a version that failed to upload.
  • README badges — CI, crates.io, docs.rs, npm, MSRV, license.

Bootstrap prerequisite — required before tagging

OIDC publishing needs a Trusted Publisher (or Pending Publisher for unpublished names) configured per registry per package. Until they exist, the publish jobs fail on OIDC auth and the release isn't created — safe to re-run after configuring.

crates.io → Settings → Trusted Publishing → Add. Four entries: partly-proxy-types, partly-proxy-storage-jsonl, partly-proxy-storage-sqlite, partly-proxy-lib.

npmjs.com → package settings → Trusted Publisher. One entry: @partly/proxy-client.

All bound to:

  • repository: thepartly/partly-proxy
  • workflow: release.yml
  • environment: release

@hardbyte hardbyte requested a review from JosiahBull May 20, 2026 08:34
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7fb26579f1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml
Comment thread crates/partly-proxy-lib/Cargo.toml Outdated
hardbyte added 4 commits May 20, 2026 21:57
repository was set to thepartly/api-proxy, which 404s. The actual
repo is thepartly/partly-proxy — set both repository and homepage to
that. crates.io and docs.rs link these verbatim. Member crates
inherit via 'repository.workspace = true'.
Without [package.metadata.docs.rs], docs.rs builds with default
features only. all-features = true picks up storage-sqlite (lib),
testing (types), and any future opt-in surface. --cfg docsrs is set
so future #[cfg_attr(docsrs, doc_cfg(...))] annotations render
feature gates inline in published rustdoc.
Tag-triggered (v*) workflow:

  version-check    verify the tag matches workspace.package.version,
                   every member crate's manifest version, and the
                   ts-client package.json version. shared-version=true
                   in release.toml is intent, not enforcement — drift
                   from cargo-release failures or hand-edits would
                   otherwise publish mismatched artifacts.

  publish-crates   crates.io via OIDC Trusted Publishing
                   (rust-lang/crates-io-auth-action@v1) — no long-lived
                   CARGO_REGISTRY_TOKEN secret. Publishes in dep order
                   (types → storage-jsonl → storage-sqlite → lib) with
                   30s waits for sparse-index propagation.

  publish-npm      @partly/proxy-client via npm OIDC Trusted Publishing
                   with --provenance. No NPM_TOKEN secret.

  github-release   created only after both publish jobs succeed, so
                   the release page never advertises a version that
                   failed to upload.

Bootstrap prerequisite (one-time per artifact, not gated by this PR):
configure Trusted Publishers on crates.io and npmjs.com for each
package, bound to repo=thepartly/partly-proxy, workflow=release.yml,
environment=release. Until those exist, the publish jobs fail on OIDC
auth and the release isn't created — safe to re-run.
@hardbyte hardbyte force-pushed the brian/release-pipeline-and-publish-prep branch from 50cf292 to ca0d8a5 Compare May 20, 2026 09:57
Copy link
Copy Markdown
Collaborator

@JosiahBull JosiahBull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JosiahBull JosiahBull merged commit 39777cb into main May 20, 2026
3 checks passed
@JosiahBull JosiahBull deleted the brian/release-pipeline-and-publish-prep branch May 20, 2026 21:07
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