Skip to content

chore(process-daemon): publish from the monorepo - #59695

Merged
thdxr merged 2 commits into
devfrom
process-daemon-release
Oct 27, 2026
Merged

thdxr merged 2 commits into
devfrom
process-daemon-release

Conversation

@jlongster

@jlongster jlongster commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Builds on #59694 (process-daemon-import, merged). No issue.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Moves the opencode-pty release pipeline into the monorepo, so future @opencode-ai/pty releases ship from packages/process-daemon. npm package names, the opencode-pty crate and binary stay the same.

  • Adds .github/workflows/release-process-daemon.yml, ported from opencode-pty's publish.yml. Jobs, GitHub-hosted runners, pinned actions, toolchains, Zig workarounds, smoke tests, attestations and npm trusted publishing (id-token: write, npm ≥ 11.5.1, --provenance) are unchanged. All steps run in packages/process-daemon, and all paths are updated. actions/attest is now pinned to the v4.2.2 SHA.
  • Triggers:
    • process-daemon-vX.Y.Z tags publish. The tag must match ^process-daemon-v[0-9]+\.[0-9]+\.[0-9]+([+-][0-9A-Za-z.-]+)?$, and ${tag#process-daemon-v} must equal the version in Cargo.toml and npm/package.json, including its optionalDependencies.
    • Pull requests that touch the workflow, build.rs, npm/** or script/npm-packages.mjs run the full build and npm pack, with no release and no publish.
    • workflow_dispatch is also available.
    • I dropped the old push-to-master build: check-process-daemon.yml already tests every push to dev.
  • Publish steps only run when the ref starts with refs/tags/process-daemon-v.
  • The GitHub release is created as a draft with --verify-tag --latest=false, the assets are uploaded, and then it is published with --latest=false. This is the same pattern as .github/release/publish-github-release.sh, so the monorepo's Latest release (which OpenCode's update paths follow) never changes. The title is process-daemon vX.Y.Z, with a one-line --notes instead of --generate-notes, which would dump monorepo history.
  • npm/package.json and Cargo.toml repository now point at anomalyco/opencode, which npm provenance requires. The generated platform packages get directory: packages/process-daemon.
  • Updates the README "Releases" section (and only that section) and fixes three stale comments in core and server tests. Comments only, no behaviour change.

Before the first process-daemon-v* tag, a maintainer must change the npm trusted publisher on all 9 packages (@opencode-ai/pty and @opencode-ai/pty-{darwin-arm64,darwin-x64,linux-arm64-gnu,linux-arm64-musl,linux-x64-gnu,linux-x64-musl,win32-arm64,win32-x64}) to repository anomalyco/opencode, workflow release-process-daemon.yml, with no environment.

Tag ruleset: the active "Release tags: releasers and release deploy key" ruleset only covers refs/tags/{v*,github-v*,vscode-v*,latest}. process-daemon-v* is not covered, so anyone with write access can push one and trigger an npm publish. To restrict it, add refs/tags/process-daemon-v* to that ruleset, or create a separate one. Note that v* doesn't match process-daemon-v*, so the existing rule won't block these tags either.

Follow-up to consider: packages/console/app/src/lib/changelog.ts lists the latest 20 releases of anomalyco/opencode without filtering, so process-daemon releases would appear on the changelog page. That code is unchanged here.

How did you verify your code works?

  • I parsed the workflow YAML with Ruby. actionlint isn't installed here.
  • I ran node --check script/npm-packages.mjs. I also ran the script against dummy archives for all 8 targets and checked the generated repository fields.
  • The tag, release and publish paths can't run until a real tag is pushed. This PR's own run covers the build and pack path.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@jlongster
jlongster requested a review from a team as a code owner October 27, 2026 19:41
@jlongster
jlongster force-pushed the process-daemon-import branch from 58833a6 to 985f7a3 Compare October 27, 2026 19:54
@jlongster
jlongster force-pushed the process-daemon-release branch from 6da1f5a to 741bebc Compare October 27, 2026 19:55
Base automatically changed from process-daemon-import to dev October 27, 2026 20:04
@jlongster
jlongster force-pushed the process-daemon-release branch from 741bebc to 242cccf Compare October 27, 2026 20:07
@thdxr
thdxr merged commit f4ecbf3 into dev Oct 27, 2026
19 checks passed
@thdxr
thdxr deleted the process-daemon-release branch October 27, 2026 22:15
alsuren pushed a commit to alsuren/opencode that referenced this pull request Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants