feat(publish): reconstruct opencode-stable publish pipeline + CI (Plan B)#6
Merged
Conversation
Comprehensive fork specification modeled on opencode-acp's AGENTS.md, covering: project overview & tech stack, monorepo architecture, the version- pinning pitfall (OPENCODE_VERSION env var — omitting it invalidates all sessions), storage paths & data safety, fork-specific realities (3 remotes, broken publish infrastructure, snapshot-fix divergence history), git safety rules, and a mandatory pre-publish checklist.
Reconstructs the fork-specific publish infrastructure that was overwritten by an upstream sync (see AGENTS.md §4.5). Restores the -stable npm naming across build/publish/postinstall and adds a dedicated CI workflow on the GitHub mirror. - build.ts: platform package names get -stable suffix; enrich platform package.json (description/files/license); add --no-windows flag (fork ships no Windows packages) - publish.ts: umbrella = opencode-stable with full metadata, stub bin/opencode.exe (postinstall overwrites it), filters Windows, drops upstream Docker/AUR/Homebrew steps (target anomalyco infra) - postinstall.mjs: restore verbatim from published 1.14.41 tarball — full avx2/musl/baseline fallback logic for resolving the right platform binary - publish-stable.yml: new tag-triggered (v*) workflow on the GitHub mirror, single ubuntu job, builds 9 cross-compile targets, publishes via NPM_TOKEN
Contributor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
The fork mirror (ranxianglei/opencode-stable) does not have Blacksmith configured, so all jobs using blacksmith-4vcpu-* runners hang forever in QUEUED state. Swap every occurrence across all 22 workflow files: blacksmith-4vcpu-ubuntu-2404 -> ubuntu-latest blacksmith-4vcpu-ubuntu-2404-arm -> ubuntu-latest blacksmith-4vcpu-windows-2025 -> windows-latest This unblocks test.yml (unit/e2e), typecheck.yml, and every other workflow so CI actually runs on the fork.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reconstructs the fork-specific publish infrastructure that was overwritten by an upstream sync (documented in the new AGENTS.md §4.5). This is Plan B from issue #5: a fork-specific CI pipeline on this mirror that publishes
opencode-stableto npm, triggered by tags.Closes the blocker that prevented a clean
1.14.42release: the existingbuild.ts/publish.ts/postinstall.mjswere upstream's versions producing the wrong package names (opencode-ai,opencode-{platform}) — running them would attempt to publish sst-owned packages and fail.Changes
docs(agents): add fork-level AGENTS.md(feac1fed2)OPENCODE_VERSIONsession-invalidation pitfall, storage/data safety, 3-remote layout, broken-publish-infra history, snapshot-fix divergence log, git safety rules, mandatory pre-publish checklist.feat(publish): reconstruct opencode-stable publish pipeline + CI(bc7f17269)build.ts: platform package names get-stablesuffix; platformpackage.jsonenriched (description / files / license to match what's published at 1.14.41); new--no-windowsflag (the fork ships no Windows packages).publish.ts: umbrella =opencode-stablewith full metadata + stubbin/opencode.exe(postinstall overwrites it with the real platform binary); filters Windows binaries; drops upstream's Docker / AUR / Homebrew steps (those targetanomalyco/*infrastructure and would fail here).postinstall.mjs: restored verbatim from the publishedopencode-stable@1.14.41tarball — the full avx2/musl/baseline fallback logic for resolving the correct platform binary (the upstream version that overwrote it had no-stablenames and no fallback)..github/workflows/publish-stable.yml(new): tag-triggered (v*) workflow, gated to this repo, single ubuntu job → builds 9 cross-compile targets (--no-windows) → publishes viaNPM_TOKENsecret.Verification
bun run typecheck(tsgo --noEmit) → exit 0, 0 errorspublish-stable.ymlvalidated as YAMLTo release
1.14.42(after this merges)NPM_TOKENsecret to this repo (Settings → Secrets → Actions). The token must have publish rights foropencode-stable+ the 9opencode-*-stablepackages (owner:ranxianglei).git tag -a v1.14.42 -m "release v1.14.42" git push origin v1.14.42