Skip to content

Commit 7535a56

Browse files
authored
feat: Zoo Code marketplace identity and publish workflows (#38)
* refactor(package.json): updating extension metadata * feat(ci): add stable and prerelease marketplace publishing * feat(Telemetry): add prerelease channel tags * docs(CHANGELOG): bumping init Zoo version * fix: ci * fix(deepseek): tests * refactor(README): updated for vscode marketplace * fix(ci): bundle web view in app * fix(tests): remove duplicate deepseek key from routerModels assertions * fix(e2e): update extension ID to ZooCodeOrganization.zoo-code * fix(coverage): exclude vite.config.ts from vitest instrumentation * fix(zoo-code): extension identity mismatches * fix(cli): runtime config namespace * fix(tests): update stale roo-cline IDs missed in rebranding * feat(ci): validating identity
1 parent d191fe0 commit 7535a56

40 files changed

Lines changed: 488 additions & 323 deletions

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://unpkg.com/@changesets/config@3.0.4/schema.json",
33
"changelog": "./changelog-config.js",
44
"commit": false,
5-
"fixed": [["roo-cline"]],
5+
"fixed": [["zoo-code"]],
66
"linked": [],
77
"access": "restricted",
88
"baseBranch": "main",
Lines changed: 100 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,125 @@
1-
name: Publish Extension
1+
name: Publish Stable Extension
22

33
on:
4-
pull_request:
5-
types: [closed]
4+
push:
5+
tags:
6+
- "v*.*.*"
67
workflow_dispatch:
78

8-
env:
9-
GIT_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'main' }}
10-
119
jobs:
12-
publish-extension:
10+
publish-stable:
1311
runs-on: ubuntu-latest
1412
permissions:
15-
contents: write # Required for pushing tags.
16-
if: >
17-
( github.event_name == 'pull_request' &&
18-
github.event.pull_request.base.ref == 'main' &&
19-
contains(github.event.pull_request.title, 'Changeset version bump') ) ||
20-
github.event_name == 'workflow_dispatch'
13+
contents: write
14+
2115
steps:
2216
- name: Checkout code
2317
uses: actions/checkout@v4
24-
with:
25-
ref: ${{ env.GIT_REF }}
18+
2619
- name: Setup Node.js and pnpm
2720
uses: ./.github/actions/setup-node-pnpm
28-
- name: Configure Git
21+
with:
22+
install-args: "--frozen-lockfile"
23+
24+
- name: Validate package identity
2925
run: |
30-
git config user.name "github-actions[bot]"
31-
git config user.email "github-actions[bot]@users.noreply.github.com"
32-
- name: Create .env file
33-
run: echo "POSTHOG_API_KEY=${{ secrets.POSTHOG_API_KEY }}" >> .env
34-
- name: Package Extension
26+
package_name=$(node -p "require('./src/package.json').name")
27+
publisher=$(node -p "require('./src/package.json').publisher")
28+
29+
test "$package_name" = "zoo-code"
30+
test "$publisher" = "ZooCodeOrganization"
31+
32+
- name: Validate release tag
33+
if: github.event_name == 'push'
3534
run: |
36-
current_package_version=$(node -p "require('./src/package.json').version")
37-
pnpm vsix
38-
39-
# Save VSIX contents to a temporary file to avoid broken pipe issues.
40-
unzip -l bin/roo-cline-${current_package_version}.vsix > /tmp/roo-code-vsix-contents.txt
41-
42-
# Check for required files.
43-
grep -q "extension/package.json" /tmp/roo-code-vsix-contents.txt || exit 1
44-
grep -q "extension/package.nls.json" /tmp/roo-code-vsix-contents.txt || exit 1
45-
grep -q "extension/dist/extension.js" /tmp/roo-code-vsix-contents.txt || exit 1
46-
grep -q "extension/webview-ui/audio/celebration.wav" /tmp/roo-code-vsix-contents.txt || exit 1
47-
grep -q "extension/webview-ui/build/assets/index.js" /tmp/roo-code-vsix-contents.txt || exit 1
48-
grep -q "extension/assets/codicons/codicon.ttf" /tmp/roo-code-vsix-contents.txt || exit 1
49-
grep -q "extension/assets/vscode-material-icons/icons/3d.svg" /tmp/roo-code-vsix-contents.txt || exit 1
50-
grep -q ".env" /tmp/roo-code-vsix-contents.txt || exit 1
51-
52-
# Clean up temporary file.
53-
rm /tmp/roo-code-vsix-contents.txt
54-
- name: Create and Push Git Tag
35+
package_version=$(node -p "require('./src/package.json').version")
36+
tag_version="${GITHUB_REF_NAME#v}"
37+
38+
if [ "$package_version" != "$tag_version" ]; then
39+
echo "Tag v${tag_version} does not match src/package.json version ${package_version}."
40+
exit 1
41+
fi
42+
43+
- name: Build workspace packages
5544
run: |
56-
current_package_version=$(node -p "require('./src/package.json').version")
57-
git tag -a "v${current_package_version}" -m "Release v${current_package_version}"
58-
git push origin "v${current_package_version}" --no-verify
59-
echo "Successfully created and pushed git tag v${current_package_version}"
60-
- name: Publish Extension
45+
pnpm --filter @roo-code/build build
46+
pnpm --filter @roo-code/vscode-webview build
47+
48+
- name: Package extension
49+
env:
50+
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
51+
run: |
52+
package_version=$(node -p "require('./src/package.json').version")
53+
pnpm --filter ./src vsix
54+
55+
vsix_path="bin/zoo-code-${package_version}.vsix"
56+
test -f "$vsix_path"
57+
58+
unzip -l "$vsix_path" > /tmp/zoo-code-vsix-contents.txt
59+
grep -q "extension/package.json" /tmp/zoo-code-vsix-contents.txt
60+
grep -q "extension/package.nls.json" /tmp/zoo-code-vsix-contents.txt
61+
grep -q "extension/dist/extension.js" /tmp/zoo-code-vsix-contents.txt
62+
grep -q "extension/webview-ui/audio/celebration.wav" /tmp/zoo-code-vsix-contents.txt
63+
grep -q "extension/webview-ui/build/assets/index.js" /tmp/zoo-code-vsix-contents.txt
64+
grep -q "extension/assets/codicons/codicon.ttf" /tmp/zoo-code-vsix-contents.txt
65+
grep -q "extension/assets/vscode-material-icons/icons/3d.svg" /tmp/zoo-code-vsix-contents.txt
66+
67+
- name: Validate packaged manifest identity
68+
run: |
69+
package_version=$(node -p "require('./src/package.json').version")
70+
vsix_path="bin/zoo-code-${package_version}.vsix"
71+
72+
artifact_name=$(unzip -p "$vsix_path" extension/package.json | jq -r '.name')
73+
artifact_publisher=$(unzip -p "$vsix_path" extension/package.json | jq -r '.publisher')
74+
75+
test "$artifact_name" = "zoo-code"
76+
test "$artifact_publisher" = "ZooCodeOrganization"
77+
78+
- name: Publish to VS Code Marketplace
6179
env:
6280
VSCE_PAT: ${{ secrets.VSCE_PAT }}
63-
OVSX_PAT: ${{ secrets.OVSX_PAT }}
6481
run: |
65-
current_package_version=$(node -p "require('./src/package.json').version")
66-
pnpm --filter roo-cline publish:marketplace
67-
echo "Successfully published version $current_package_version to VS Code Marketplace"
68-
- name: Create GitHub Release
82+
package_version=$(node -p "require('./src/package.json').version")
83+
npx @vscode/vsce publish --packagePath "bin/zoo-code-${package_version}.vsix"
84+
echo "Published ZooCodeOrganization.zoo-code ${package_version} to VS Code Marketplace"
85+
86+
- name: Publish to Open VSX Registry
6987
env:
70-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88+
OVSX_PAT: ${{ secrets.OVSX_PAT }}
7189
run: |
72-
current_package_version=$(node -p "require('./src/package.json').version")
90+
package_version=$(node -p "require('./src/package.json').version")
91+
pnpm exec ovsx publish "bin/zoo-code-${package_version}.vsix" --skip-duplicate
92+
echo "Published ZooCodeOrganization.zoo-code ${package_version} to Open VSX Registry"
7393
74-
# Extract changelog for current version
75-
echo "Extracting changelog for version ${current_package_version}"
76-
changelog_content=$(sed -n "/## \\[${current_package_version}\\]/,/## \\[/p" CHANGELOG.md | sed '$d')
94+
- name: Create GitHub release
95+
env:
96+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97+
run: |
98+
package_version=$(node -p "require('./src/package.json').version")
99+
if [ "${GITHUB_REF_TYPE:-}" = "tag" ]; then
100+
tag_name="$GITHUB_REF_NAME"
101+
else
102+
tag_name="v${package_version}"
103+
fi
104+
vsix_path="bin/zoo-code-${package_version}.vsix"
77105
78-
# If changelog extraction failed, use a default message
106+
changelog_content=$(awk -v version="$package_version" '
107+
$0 ~ "^## \\[" version "\\]" { found = 1 }
108+
found && $0 == "---" { exit }
109+
found && $0 ~ "^## " && $0 !~ "^## \\[" version "\\]" { exit }
110+
found { print }
111+
' CHANGELOG.md)
79112
if [ -z "$changelog_content" ]; then
80-
echo "Warning: No changelog section found for version ${current_package_version}"
81-
changelog_content="Release v${current_package_version}"
82-
else
83-
echo "Found changelog section for version ${current_package_version}"
113+
changelog_content="Release ${tag_name}"
84114
fi
115+
printf "%s\n" "$changelog_content" > /tmp/zoo-code-release-notes.md
85116
86-
# Create release with changelog content
87-
gh release create "v${current_package_version}" \
88-
--title "Release v${current_package_version}" \
89-
--notes "$changelog_content" \
90-
--target ${{ env.GIT_REF }} \
91-
bin/roo-cline-${current_package_version}.vsix
92-
echo "Successfully created GitHub Release v${current_package_version}"
117+
if gh release view "$tag_name" >/dev/null 2>&1; then
118+
gh release upload "$tag_name" "$vsix_path" --clobber
119+
else
120+
gh release create "$tag_name" \
121+
--title "Zoo Code ${tag_name}" \
122+
--notes-file /tmp/zoo-code-release-notes.md \
123+
--target "$GITHUB_SHA" \
124+
"$vsix_path"
125+
fi
Lines changed: 78 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,101 @@
1-
name: Nightly Publish
1+
name: Publish Pre-release Extension
22

33
on:
44
push:
55
branches: [main]
66
workflow_dispatch: # Allows manual triggering.
77

8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: marketplace-prerelease
13+
cancel-in-progress: false
14+
815
jobs:
9-
publish-nightly:
16+
publish-prerelease:
1017
runs-on: ubuntu-latest
1118

12-
permissions:
13-
contents: read # No tags pushed → read is enough.
14-
1519
steps:
1620
- name: Checkout code
1721
uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 0
22+
2023
- name: Setup Node.js and pnpm
2124
uses: ./.github/actions/setup-node-pnpm
2225
with:
23-
install-args: '--frozen-lockfile'
24-
- name: Forge numeric Nightly version
26+
install-args: "--frozen-lockfile"
27+
28+
- name: Validate package identity
29+
run: |
30+
package_name=$(node -p "require('./src/package.json').name")
31+
publisher=$(node -p "require('./src/package.json').publisher")
32+
33+
test "$package_name" = "zoo-code"
34+
test "$publisher" = "ZooCodeOrganization"
35+
36+
- name: Set pre-release version
2537
id: version
2638
env:
2739
RUN_NUMBER: ${{ github.run_number }}
28-
run: echo "number=$(( 5500 + ${RUN_NUMBER} ))" >> $GITHUB_OUTPUT
29-
- name: Patch package.json version
30-
env:
31-
VERSION_NUMBER: ${{ steps.version.outputs.number }}
3240
run: |
3341
node <<'EOF'
34-
const fs = require('fs');
35-
const path = require('path');
36-
const pkgPath = path.join(__dirname, 'apps', 'vscode-nightly', 'package.nightly.json');
37-
const pkg = JSON.parse(fs.readFileSync(pkgPath,'utf8'));
38-
const [maj, min] = pkg.version.split('.');
39-
pkg.version = `${maj}.${min}.${process.env.VERSION_NUMBER}`;
40-
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2));
41-
console.log(`🔖 Nightly version set to ${pkg.version}`);
42+
const fs = require("fs")
43+
const pkgPath = "src/package.json"
44+
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"))
45+
const [major, minor] = pkg.version.split(".").map(Number)
46+
const prereleaseMinor = minor % 2 === 0 ? minor + 1 : minor + 2
47+
const patch = 100000 + Number(process.env.RUN_NUMBER)
48+
49+
pkg.version = `${major}.${prereleaseMinor}.${patch}`
50+
fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, "\t")}\n`)
51+
fs.appendFileSync(process.env.GITHUB_OUTPUT, `number=${pkg.version}\n`)
52+
console.log(`Pre-release version set to ${pkg.version}`)
4253
EOF
43-
- name: Build VSIX
44-
run: pnpm vsix:nightly # Produces bin/roo-code-nightly-0.0.[count].vsix
45-
- name: Publish to VS Code Marketplace
54+
55+
- name: Build workspace packages
4656
env:
47-
VSCE_PAT: ${{ secrets.VSCE_PAT }}
48-
run: npx vsce publish --packagePath "bin/$(/bin/ls bin | head -n1)"
49-
- name: Publish to Open VSX Registry
57+
PKG_RELEASE_CHANNEL: prerelease
58+
run: |
59+
pnpm --filter @roo-code/build build
60+
pnpm --filter @roo-code/vscode-webview build
61+
62+
- name: Package pre-release VSIX
5063
env:
51-
OVSX_PAT: ${{ secrets.OVSX_PAT }}
52-
run: npx ovsx publish "bin/$(ls bin | head -n1)"
64+
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
65+
PKG_RELEASE_CHANNEL: prerelease
66+
run: |
67+
mkdir -p bin
68+
pnpm --filter ./src exec vsce package --pre-release --no-dependencies --out ../bin
69+
70+
- name: Verify VSIX contents
71+
env:
72+
VERSION_NUMBER: ${{ steps.version.outputs.number }}
73+
run: |
74+
vsix_path="bin/zoo-code-${VERSION_NUMBER}.vsix"
75+
unzip -l "$vsix_path" > /tmp/zoo-code-vsix-contents.txt
76+
grep -q "extension/package.json" /tmp/zoo-code-vsix-contents.txt
77+
grep -q "extension/dist/extension.js" /tmp/zoo-code-vsix-contents.txt
78+
grep -q "extension/webview-ui/build/assets/index.js" /tmp/zoo-code-vsix-contents.txt
79+
grep -q "extension/webview-ui/audio/celebration.wav" /tmp/zoo-code-vsix-contents.txt
80+
81+
- name: Validate packaged manifest identity
82+
env:
83+
VERSION_NUMBER: ${{ steps.version.outputs.number }}
84+
run: |
85+
vsix_path="bin/zoo-code-${VERSION_NUMBER}.vsix"
86+
87+
artifact_name=$(unzip -p "$vsix_path" extension/package.json | jq -r '.name')
88+
artifact_publisher=$(unzip -p "$vsix_path" extension/package.json | jq -r '.publisher')
89+
90+
test "$artifact_name" = "zoo-code"
91+
test "$artifact_publisher" = "ZooCodeOrganization"
92+
93+
# Open VSX is intentionally excluded: it has no pre-release channel concept,
94+
# so pre-release builds would surface as the latest stable version for all users.
95+
- name: Publish pre-release to VS Code Marketplace
96+
env:
97+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
98+
VERSION_NUMBER: ${{ steps.version.outputs.number }}
99+
run: |
100+
npx @vscode/vsce publish --pre-release --packagePath "bin/zoo-code-${VERSION_NUMBER}.vsix"
101+
echo "Published ZooCodeOrganization.zoo-code ${VERSION_NUMBER} as a VS Code Marketplace pre-release"

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
# Roo Code Changelog
1+
# Zoo Code Changelog
2+
3+
All notable changes to Zoo Code will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and Zoo Code uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [3.54.0] - 2026-05-08
8+
9+
### Added
10+
11+
- Publish Zoo Code under the `ZooCodeOrganization.zoo-code` Marketplace identity, continuing from upstream Roo Code `3.53.0`.
12+
- Add stable publishing workflows for the VS Code Marketplace and Open VSX Registry.
13+
- Add a VS Code Marketplace pre-release workflow.
14+
15+
---
16+
17+
# Archived Roo Code Changelog
18+
19+
The entries below are preserved from the upstream Roo Code project history before the Zoo Code marketplace handoff.
220

321
## 3.53.0
422

0 commit comments

Comments
 (0)