Skip to content

Add crates.io and npm publish workflows - #17

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/publish-workflows-69b2
Aug 31, 2026
Merged

Add crates.io and npm publish workflows#17
cursor[bot] merged 1 commit into
mainfrom
cursor/publish-workflows-69b2

Conversation

@sroomberg

Copy link
Copy Markdown
Owner

Summary

Adds reusable GitHub Actions workflows to publish chorus-relay to crates.io and the OpenCode npm packages (@chorus/shared, @chorus/client, @chorus/plugin) to npm. Both workflows can be run on their own or are invoked automatically by the existing release workflow when a v* tag is pushed.

Workflows

Workflow Trigger Publishes
Publish to crates.io Manual (workflow_dispatch) or called from Release chorus-relay
Publish to npm Manual (workflow_dispatch) or called from Release @chorus/shared, @chorus/client, @chorus/plugin
Release (updated) Push v* tag GitHub release + both publish workflows (after CI)

Each publish workflow supports:

  • Dry run — validate packaging without publishing
  • Expected version — optional input to assert manifest versions match (auto-detected from tag on release)
  • Skip if already published — idempotent re-runs

Package metadata

  • Removed publish = false from chorus-relay and added crates.io metadata (readme, keywords, categories)
  • Removed private: true from the three npm packages that ship with the OpenCode plugin; added publishConfig.access: public
  • Aligned @chorus/shared version to 2.1.0 to match the other packages

Secrets required

Configure these repository secrets (or trusted publishing equivalents):

  • CARGO_REGISTRY_TOKEN — crates.io API token
  • NPM_TOKEN — npm automation token with publish access to @chorus/*

Manual usage

  1. Actions → Publish to crates.io (or npm) → Run workflow
  2. Optionally enable Dry run to validate without publishing
  3. Optionally set Expected version (e.g. 2.1.0) to verify manifests before publish

Release usage

Push a tag whose version matches the manifests (e.g. v2.1.0 when Cargo.toml and package.json are 2.1.0). CI runs first; then GitHub release creation and both registry publishes run in parallel.

Open in Web Open in Cursor 

Introduce reusable publish-crates and publish-npm workflows that can be
triggered manually or from the release workflow on version tags.

- Enable chorus-relay for crates.io with readme and metadata
- Mark @chorus/shared, @chorus/client, and @chorus/plugin as public npm
  packages (OpenCode plugin plus its workspace dependencies)
- Add scripts/publish-npm.sh for ordered npm publish with dry-run and
  skip-if-already-published behavior
- Wire release.yml to publish after CI passes on v* tags

Co-authored-by: Steven Roomberg <sroomberg@users.noreply.github.com>
@sroomberg
sroomberg marked this pull request as ready for review August 31, 2026 14:21
@cursor
cursor Bot merged commit 6012d18 into main Aug 31, 2026
2 checks passed
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