Repository navigation
Support OpenCode 1.x and 2.x on version branches - #52
Merged
Merged
Conversation
Move from the single `latest` branch to major-version branches `1` and `2`, published to the `1` and `2` Store tracks. Track `1` is also promoted to `latest/stable`, so existing consumers keep getting OpenCode 1.x. - Download OpenCode 2.x from the `@opencode/cli-linux-*` npm packages, verified against the registry's sha512 integrity; 2.x is not published as GitHub release assets. 1.x keeps the GitHub release download. - Stage the version in the SDK so hooks can apply major-specific setup. - OpenCode 2.x no longer reads /etc/opencode, so export OPENCODE_CONFIG pointing at the SDK config. The workshop prompt is still not applied on 2.x because of anomalyco/opencode#51341; it takes effect once a fixed release is picked up. - Renovate: one regex manager per major (github-releases for 1.x, npm @opencode/cli for 2.x), each pinned to its branch. - Workflows: build/upload on `[0-9]+` branches, track from the branch name. - Spread: add a 2.x config test, skipped on 1.x.
Drop the base64->hex conversion for npm's sha512 SRI. 1.x keeps GitHub's sha256 (hex, via sha256sum -c); 2.x compares npm's sha512 SRI directly (openssl dgst -sha512 -binary | base64). Removes the ACTUAL_CMD indirection, format guards, and temp-file handling; adds openssl to build-packages.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The version-specific packaging, publishing, configuration, and tests are consistent and complete.
Review effort: Balanced
Findings: None
What changed in this PR
Adds separate OpenCode 1.x and 2.x release tracks with version-specific packaging, configuration, testing, and dependency updates.
Changes:
- Adds major-version-aware download and setup logic.
- Publishes numeric version branches and promotes track 1 to
latest. - Adds Renovate configuration, documentation, and 2.x config tests.
| File | Description |
|---|---|
sdkcraft.yaml |
Packages appropriate 1.x or 2.x artifacts. |
hooks/setup-base |
Configures the 2.x system config path. |
renovate.json |
Updates each version branch independently. |
.github/workflows/build.yml |
Builds pull requests targeting version branches. |
.github/workflows/upload.yml |
Publishes version tracks and promotes track 1. |
tests/spread.yaml |
Exposes the tested major version. |
tests/main/v2-config/task.yaml |
Verifies 2.x configuration loading. |
tests/main/v2-config/workshop.yaml.in |
Defines the test workshop. |
README.md |
Documents available tracks and the 2.x limitation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jonathan-conder
approved these changes
Oct 7, 2026
Co-authored-by: Jonathan Conder <[email protected]> Signed-off-by: Dmitry Lyfar <[email protected]>
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.
Converts the OpenCode SDK from a single
latesttrack to two major-versiontracks,
1and2, each maintained on its own version branch.Channels
1/stable2/stablelatest/stable1, until 2.x becomes the default)Ran spread tests locally for 2.*.
Follow-ups (not in this PR)
1(VERSION=1.18.33) and2(VERSION=<2.x>) offmainafter merge.long_term_branchesto["1","2"]and branch protection(
build / build+ Renovate bypass) in canonical-repo-automation.latestbranch once1/2are live.