fix(ThinkingBudget): support xhigh and all extended reasoning effort … #213
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
| name: Publish Pre-release Extension | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: # Allows manual triggering. | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: marketplace-prerelease | |
| cancel-in-progress: false | |
| jobs: | |
| publish-prerelease: | |
| runs-on: ubuntu-latest | |
| environment: marketplace-prerelease | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup Node.js and pnpm | |
| uses: ./.github/actions/setup-node-pnpm | |
| with: | |
| install-args: "--frozen-lockfile" | |
| - name: Validate package identity | |
| run: | | |
| package_name=$(node -p "require('./src/package.json').name") | |
| publisher=$(node -p "require('./src/package.json').publisher") | |
| test "$package_name" = "zoo-code" | |
| test "$publisher" = "ZooCodeOrganization" | |
| - name: Validate publish ref | |
| run: | | |
| if [ "$GITHUB_REF_NAME" != "main" ]; then | |
| echo "Pre-release publishes must run from main, not ${GITHUB_REF_NAME}." | |
| exit 1 | |
| fi | |
| - name: Set pre-release version | |
| id: version | |
| env: | |
| RUN_NUMBER: ${{ github.run_number }} | |
| run: | | |
| node <<'EOF' | |
| const fs = require("fs") | |
| const pkgPath = "src/package.json" | |
| const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8")) | |
| const [major, minor] = pkg.version.split(".").map(Number) | |
| const prereleaseMinor = minor % 2 === 0 ? minor + 1 : minor + 2 | |
| const patch = 100000 + Number(process.env.RUN_NUMBER) | |
| pkg.version = `${major}.${prereleaseMinor}.${patch}` | |
| fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, "\t")}\n`) | |
| fs.appendFileSync(process.env.GITHUB_OUTPUT, `number=${pkg.version}\n`) | |
| console.log(`Pre-release version set to ${pkg.version}`) | |
| EOF | |
| - name: Build workspace packages | |
| env: | |
| PKG_RELEASE_CHANNEL: prerelease | |
| run: | | |
| pnpm --filter @roo-code/build build | |
| pnpm --filter @roo-code/vscode-webview build | |
| - name: Package pre-release VSIX | |
| env: | |
| POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} | |
| PKG_RELEASE_CHANNEL: prerelease | |
| run: | | |
| mkdir -p bin | |
| pnpm --filter ./src exec vsce package --pre-release --no-dependencies --out ../bin | |
| - name: Verify VSIX contents | |
| env: | |
| VERSION_NUMBER: ${{ steps.version.outputs.number }} | |
| run: | | |
| vsix_path="bin/zoo-code-${VERSION_NUMBER}.vsix" | |
| unzip -l "$vsix_path" > /tmp/zoo-code-vsix-contents.txt | |
| grep -q "extension/package.json" /tmp/zoo-code-vsix-contents.txt | |
| grep -q "extension/dist/extension.js" /tmp/zoo-code-vsix-contents.txt | |
| grep -q "extension/webview-ui/build/assets/index.js" /tmp/zoo-code-vsix-contents.txt | |
| grep -q "extension/webview-ui/audio/celebration.wav" /tmp/zoo-code-vsix-contents.txt | |
| - name: Validate packaged manifest identity | |
| env: | |
| VERSION_NUMBER: ${{ steps.version.outputs.number }} | |
| run: | | |
| vsix_path="bin/zoo-code-${VERSION_NUMBER}.vsix" | |
| artifact_name=$(unzip -p "$vsix_path" extension/package.json | jq -r '.name') | |
| artifact_publisher=$(unzip -p "$vsix_path" extension/package.json | jq -r '.publisher') | |
| test "$artifact_name" = "zoo-code" | |
| test "$artifact_publisher" = "ZooCodeOrganization" | |
| # Open VSX is intentionally excluded: it has no pre-release channel concept, | |
| # so pre-release builds would surface as the latest stable version for all users. | |
| - name: Publish pre-release to VS Code Marketplace | |
| env: | |
| VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
| VERSION_NUMBER: ${{ steps.version.outputs.number }} | |
| run: | | |
| npx @vscode/vsce publish --pre-release --packagePath "bin/zoo-code-${VERSION_NUMBER}.vsix" | |
| echo "Published ZooCodeOrganization.zoo-code ${VERSION_NUMBER} as a VS Code Marketplace pre-release" |