This document describes the release process for the Supercode fork of OpenCode.
The auto-update feature works by checking GitHub releases from the kirmad/supercode repository. When a new release is available, users will be prompted to update.
The auto-update logic is located in:
packages/opencode/src/installation/index.ts- Checks for latest releasespackages/opencode/src/cli/cmd/tui.ts- Triggers auto-update check on startup
- Go to GitHub Actions
- Click on "Release Supercode" workflow
- Click "Run workflow"
- Enter the version number (e.g.,
1.0.0) - Optionally mark as pre-release
- Click "Run workflow"
The workflow will:
- Build binaries for all platforms
- Create a GitHub release with release notes
- Upload distribution files
- Optionally publish to npm
Run the release script from the repository root:
./script/release-supercode.sh <version>Example:
./script/release-supercode.sh 1.0.0This will:
- Update version in all package.json files
- Commit the changes
- Create a git tag
- Push to GitHub
- Trigger the GitHub Actions workflow
-
Update version in package.json files:
# Update all package.json files to new version find . -name "package.json" -not -path "*/node_modules/*" | \ xargs sed -i 's/"version": "[^"]*"/"version": "1.0.0"/'
-
Commit and tag:
git add -A git commit -m "release: v1.0.0" git tag v1.0.0 git push origin dev --tags -
Create GitHub release:
gh release create v1.0.0 \ --title "v1.0.0" \ --generate-notes \ --target dev
We follow semantic versioning (MAJOR.MINOR.PATCH):
- MAJOR: Breaking changes
- MINOR: New features (backwards compatible)
- PATCH: Bug fixes
Pre-release versions use the format: X.Y.Z-alpha.N or X.Y.Z-beta.N
Before creating a release:
- All tests pass
- Code has been reviewed
- Documentation is updated
- CHANGELOG is updated (if applicable)
- Version numbers are consistent
- No uncommitted changes
To test auto-update locally:
- Create a test release on GitHub
- Install an older version of supercode
- Run
opencodeand verify it detects the update - Confirm the update installs correctly
-
Check if releases exist:
gh api repos/kirmad/supercode/releases/latest
-
Verify the installation method:
opencode --version
-
Check auto-update is enabled in config:
cat ~/.config/opencode/opencode.json | grep autoupdate
- Check GitHub Actions logs
- Ensure all secrets are configured:
GITHUB_TOKEN(automatic)NPM_TOKEN(if publishing to npm)
Supercode can be installed via:
-
curl (recommended):
curl -fsSL https://raw.githubusercontent.com/kirmad/supercode/dev/install | bash -
npm:
npm install -g @kirmad/supercode
-
bun:
bun install -g @kirmad/supercode
-
Direct download: From GitHub releases page
Since this is a fork of OpenCode:
- Keep upstream changes mergeable by minimizing core file modifications
- Create new files rather than modifying existing ones when possible
- Document any divergence from upstream in FORK_CHANGES.md
- Regularly merge upstream changes to stay current