From ad7f9a1ad2eac4e89e1a3e50a4dbf4990d84b600 Mon Sep 17 00:00:00 2001 From: Maxine Orlen Date: Tue, 12 May 2026 20:17:06 +0200 Subject: [PATCH 01/11] ci: add automated release creation (#96) --- .github/workflows/release.yml | 92 +++++++++++++++++++++++++++++------ 1 file changed, 76 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb7a860..89596ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,43 +1,102 @@ -name: Release +name: Manual Release + on: - release: - types: [published] + workflow_dispatch: + inputs: + version_bump: + description: 'Select version bump type' + required: true + default: 'patch' + type: choice + options: + - patch + - minor + - major + +permissions: + contents: write + jobs: - package-vscode: - permissions: - contents: write + # Bumps the version, tags it, and creates the baseline GitHub Release + create-release: + name: Cut Release Tag + runs-on: ubuntu-latest + outputs: + tag: ${{ steps.version.outputs.tag }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Configure Git User + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + + - name: Bump Version & Tag + id: version + working-directory: vscode-extension + run: | + NEW_VERSION=$(npm version ${{ inputs.version_bump }} -m "chore: release %s") + echo "tag=$NEW_VERSION" >> $GITHUB_OUTPUT + + - name: Push commit and tag to main + run: | + git push origin main + git push origin ${{ steps.version.outputs.tag }} + - name: Create Base GitHub Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Create an empty release container marked as latest + gh release create ${{ steps.version.outputs.tag }} \ + --title "${{ steps.version.outputs.tag }}" \ + --generate-notes \ + --latest + + # Builds and appends the VS Code Extension asset + package-vscode: + name: Build & Upload VS Code Extension + needs: create-release runs-on: ubuntu-latest defaults: run: working-directory: vscode-extension - steps: - uses: actions/checkout@v4 + with: + ref: ${{ needs.create-release.outputs.tag }} + - uses: actions/setup-node@v4 with: node-version: 22 cache: npm cache-dependency-path: vscode-extension/package-lock.json - - run: npm i + + - run: npm ci - run: npm run compile - run: npx vsce package --out vscode-extension.vsix + + # Use softprops to cleanly append the asset to the existing tag - name: Upload VSIX to Release uses: softprops/action-gh-release@v2 with: - files: vscode-extension/*.vsix + tag_name: ${{ needs.create-release.outputs.tag }} + files: vscode-extension/vscode-extension.vsix + # Builds and appends the OpenCode Plugin asset package-opencode: - permissions: - contents: write - + name: Build & Upload OpenCode Plugin + needs: create-release runs-on: ubuntu-latest defaults: run: working-directory: opencode-plugin - steps: - uses: actions/checkout@v4 + with: + ref: ${{ needs.create-release.outputs.tag }} - uses: oven-sh/setup-bun@v1 with: @@ -46,8 +105,9 @@ jobs: - run: bun install - run: bun run build - - name: Upload Release Asset + - name: Upload OpenCode Asset to Release uses: softprops/action-gh-release@v2 with: - files: | - opencode-plugin/dist/tracybot-oc.js + tag_name: ${{ needs.create-release.outputs.tag }} + files: opencode-plugin/dist/tracybot-oc.js + From fd5b5bc25f9dbbb415d2cd19a46f7c1b5e06047a Mon Sep 17 00:00:00 2001 From: Maxine Orlen Date: Tue, 12 May 2026 20:29:30 +0200 Subject: [PATCH 02/11] chore: move install logic to scripts (#96) --- README.md | 28 +++++++++++++++++++++------- vscode-extension/install.ps1 | 19 +++++++++++++++++++ vscode-extension/install.sh | 15 +++++++++++++++ 3 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 vscode-extension/install.ps1 create mode 100644 vscode-extension/install.sh diff --git a/README.md b/README.md index f4b57db..81d7e30 100644 --- a/README.md +++ b/README.md @@ -47,20 +47,34 @@ cd opencode-plugin bun run deploy ``` -### 3. Run the VS Code Extension +### 3. Install the VSCode Extension -There are 2 different ways of using our extension +#### Automated installation (recommended) -Option 1. Run +##### Linux & macOS +In the terminal, run ```bash -bash -c "curl -Ls -o tracy.vsix https://github.com/TracyTeam/tracybot/releases/latest/download/vscode-extension.vsix && code --install-extension tracy.vsix && rm tracy.vsix" +curl -fsSL https://raw.githubusercontent.com/TracyTeam/tracybot/main/vscode-extension/install.sh | bash ``` -Option 2. Manual install -1. Download packaged extension +##### Windows + +In Powershell, run +```powershell +powershell -Command "irm https://raw.githubusercontent.com/TracyTeam/tracybot/main/install.ps1 | iex" +``` + +#### Manual installation + +Alternatively, the extension can be installed manually. + +1. Download the packaged extension ```bash -bash -c "curl -Ls -o tracy.vsix https://github.com/TracyTeam/tracybot/releases/latest/download/vscode-extension.vsix" +curl -fsSL -o tracy.vsix https://github.com/TracyTeam/tracybot/releases/latest/download/vscode-extension.vsix ``` + +or from the [latest release](https://github.com/TracyTeam/tracybot/releases/latest) + Then open VSCode and go to EXTENSIONS (left side) --> Click on the 3 dots --> Install from vsix and choose the downloaded .vsix file diff --git a/vscode-extension/install.ps1 b/vscode-extension/install.ps1 new file mode 100644 index 0000000..d8bf797 --- /dev/null +++ b/vscode-extension/install.ps1 @@ -0,0 +1,19 @@ +$ErrorActionPreference = "Stop" # Exit immediately if a command fails + +$VsixPath = Join-Path $env:TEMP "tracy_extension_$(New-Guid).vsix" + +try { + Write-Host "Downloading latest Tracy extension..." + Invoke-WebRequest -Uri "https://github.com/TracyTeam/tracybot/releases/latest/download/vscode-extension.vsix" -OutFile $VsixPath + + Write-Host "Installing extension in VS Code..." + code --install-extension $VsixPath + + Write-Host "Tracy extension installed successfully!" -ForegroundColor Green +} +finally { + # 2. Guarantee cleanup happens from the Temp folder + if (Test-Path $VsixPath) { + Remove-Item -Path $VsixPath -Force + } +} diff --git a/vscode-extension/install.sh b/vscode-extension/install.sh new file mode 100644 index 0000000..80b21bf --- /dev/null +++ b/vscode-extension/install.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -e + +TMP_DIR=$(mktemp -d) +VSIX_PATH="$TMP_DIR/tracy.vsix" + +trap 'rm -rf "$TMP_DIR"' EXIT + +echo "Downloading latest Tracy extension..." +curl -fsSL -o "$VSIX_PATH" https://github.com/TracyTeam/tracybot/releases/latest/download/vscode-extension.vsix + +echo "Installing extension in VS Code..." +code --install-extension "$VSIX_PATH" + +echo "Tracy extension installed successfully!" From c32792dcf2c3e79be695dad35e4311bd16b0430b Mon Sep 17 00:00:00 2001 From: Maxine Orlen Date: Tue, 12 May 2026 20:42:45 +0200 Subject: [PATCH 03/11] chore: add install scripts for OC plugin (#96) --- README.md | 25 ++++++++++++++++++++++++- opencode-plugin/install.ps1 | 28 ++++++++++++++++++++++++++++ opencode-plugin/install.sh | 22 ++++++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 opencode-plugin/install.ps1 create mode 100644 opencode-plugin/install.sh diff --git a/README.md b/README.md index 81d7e30..8243d15 100644 --- a/README.md +++ b/README.md @@ -76,5 +76,28 @@ curl -fsSL -o tracy.vsix https://github.com/TracyTeam/tracybot/releases/latest/d or from the [latest release](https://github.com/TracyTeam/tracybot/releases/latest) -Then open VSCode and go to EXTENSIONS (left side) --> Click on the 3 dots --> Install from vsix and choose the downloaded .vsix file +2. In VSCode, go to `EXTENSIONS tab --> Click on the 3 dots --> Install from vsix` and choose the downloaded .vsix file + +### 4. Install the OpenCode Plugin + +If you wish to use the Tracybot OpenCode integration, the OpenCode plugin needs to be installed. + +#### From VSCode + +If the VSCode extension is installed, you will be prompted to install the plugin if it was not yet installed. +You may choose to install it globally (global OpenCode plugin directory), or per project (.opencode directory in the project). + +#### Automated Installation + +To install the plugin from the terminal, run: + +##### Linux & macOS +```bash +curl -fsSL https://raw.githubusercontent.com/TracyTeam/tracybot/main/opencode-extension/install.sh | bash +``` + +##### Windows +```powershell +powershell -Command "irm https://raw.githubusercontent.com/TracyTeam/tracybot/main/opencode-extension/install.sh | iex" +``` diff --git a/opencode-plugin/install.ps1 b/opencode-plugin/install.ps1 new file mode 100644 index 0000000..31b0245 --- /dev/null +++ b/opencode-plugin/install.ps1 @@ -0,0 +1,28 @@ +$ErrorActionPreference = "Stop" + +$PluginDir = Join-Path $env:USERPROFILE ".config\opencode\plugin" +$DestPath = Join-Path $PluginDir "tracybot-oc.js" +$AssetUrl = "https://github.com/TracyTeam/tracybot/releases/latest/download/tracybot-oc.js" + +$TmpFile = Join-Path $env:TEMP "tracybot-oc_$(New-Guid).js" + +try { + Write-Host "Downloading latest OpenCode Tracy plugin..." + Invoke-WebRequest -Uri $AssetUrl -OutFile $TmpFile + + Write-Host "Ensuring plugin directory exists..." + if (-not (Test-Path $PluginDir)) { + New-Item -ItemType Directory -Path $PluginDir -Force | Out-Null + } + + Write-Host "Installing plugin..." + Move-Item -Path $TmpFile -Destination $DestPath -Force + + Write-Host "OpenCode Tracy plugin installed successfully!" -ForegroundColor Green +} +finally { + # 3. Guarantee temp file cleanup if execution is interrupted + if (Test-Path $TmpFile) { + Remove-Item -Path $TmpFile -Force + } +} diff --git a/opencode-plugin/install.sh b/opencode-plugin/install.sh new file mode 100644 index 0000000..7dd8a0b --- /dev/null +++ b/opencode-plugin/install.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -e + +PLUGIN_DIR="$HOME/.config/opencode/plugin" +DEST_PATH="$PLUGIN_DIR/tracybot-oc.js" +ASSET_URL="https://github.com/TracyTeam/tracybot/releases/latest/download/tracybot-oc.js" + +TMP_DIR=$(mktemp -d) +TMP_FILE="$TMP_DIR/tracybot-oc.js" + +trap 'rm -rf "$TMP_DIR"' EXIT + +echo "Downloading latest OpenCode Tracy plugin..." +curl -fsSL -o "$TMP_FILE" "$ASSET_URL" + +echo "Ensuring plugin directory exists ($PLUGIN_DIR)..." +mkdir -p "$PLUGIN_DIR" + +echo "Installing plugin..." +mv -f "$TMP_FILE" "$DEST_PATH" + +echo "OpenCode Tracy plugin installed successfully!" From c7d3f55bb5304c71349fb203ad89caad43848083 Mon Sep 17 00:00:00 2001 From: Maxine Orlen Date: Tue, 12 May 2026 20:45:25 +0200 Subject: [PATCH 04/11] fix: minor spelling mistake (#96) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8243d15..58ea27c 100644 --- a/README.md +++ b/README.md @@ -93,11 +93,11 @@ To install the plugin from the terminal, run: ##### Linux & macOS ```bash -curl -fsSL https://raw.githubusercontent.com/TracyTeam/tracybot/main/opencode-extension/install.sh | bash +curl -fsSL https://raw.githubusercontent.com/TracyTeam/tracybot/main/opencode-plugin/install.sh | bash ``` ##### Windows ```powershell -powershell -Command "irm https://raw.githubusercontent.com/TracyTeam/tracybot/main/opencode-extension/install.sh | iex" +powershell -Command "irm https://raw.githubusercontent.com/TracyTeam/tracybot/main/opencode-plugin/install.sh | iex" ``` From 3f5bea72bf1dabc9afe34841c56e4e14a842ad78 Mon Sep 17 00:00:00 2001 From: Maxine Orlen Date: Tue, 12 May 2026 20:49:14 +0200 Subject: [PATCH 05/11] docs: add manual install (#96) --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 58ea27c..e5c36f9 100644 --- a/README.md +++ b/README.md @@ -101,3 +101,14 @@ curl -fsSL https://raw.githubusercontent.com/TracyTeam/tracybot/main/opencode-pl powershell -Command "irm https://raw.githubusercontent.com/TracyTeam/tracybot/main/opencode-plugin/install.sh | iex" ``` +#### Manual Installation + +1. Download the built plugin (`tracybot-oc.js`) with +```bash +curl -fsSL -o tracy.vsix https://github.com/TracyTeam/tracybot/releases/latest/download/tracybot-oc.js +``` + +or from the [latest release](https://github.com/TracyTeam/tracybot/releases/latest) + +2. Place the downloaded file into the following directory: `$HOME/.config/opencode/plugin` + From e3c19156e7073ce314e74d7e3617ac233d2ab35b Mon Sep 17 00:00:00 2001 From: Maxine Orlen Date: Tue, 12 May 2026 20:58:06 +0200 Subject: [PATCH 06/11] docs: make better (#96) --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e5c36f9..7271091 100644 --- a/README.md +++ b/README.md @@ -69,13 +69,12 @@ powershell -Command "irm https://raw.githubusercontent.com/TracyTeam/tracybot/ma Alternatively, the extension can be installed manually. -1. Download the packaged extension +1. Download the packaged extension from the [latest release](https://github.com/TracyTeam/tracybot/releases/latest) +or with ```bash curl -fsSL -o tracy.vsix https://github.com/TracyTeam/tracybot/releases/latest/download/vscode-extension.vsix ``` -or from the [latest release](https://github.com/TracyTeam/tracybot/releases/latest) - 2. In VSCode, go to `EXTENSIONS tab --> Click on the 3 dots --> Install from vsix` and choose the downloaded .vsix file ### 4. Install the OpenCode Plugin @@ -103,12 +102,12 @@ powershell -Command "irm https://raw.githubusercontent.com/TracyTeam/tracybot/ma #### Manual Installation -1. Download the built plugin (`tracybot-oc.js`) with +1. Download the built plugin (`tracybot-oc.js`) from the [latest release](https://github.com/TracyTeam/tracybot/releases/latest) +or with ```bash curl -fsSL -o tracy.vsix https://github.com/TracyTeam/tracybot/releases/latest/download/tracybot-oc.js ``` -or from the [latest release](https://github.com/TracyTeam/tracybot/releases/latest) 2. Place the downloaded file into the following directory: `$HOME/.config/opencode/plugin` From 9447d54c7c29501b747ab09ec56facefe5454d83 Mon Sep 17 00:00:00 2001 From: Maxine Orlen Date: Tue, 12 May 2026 21:03:59 +0200 Subject: [PATCH 07/11] fix: use correct link (#96) --- vscode-extension/src/pluginCheck.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-extension/src/pluginCheck.ts b/vscode-extension/src/pluginCheck.ts index 5302849..d82894f 100644 --- a/vscode-extension/src/pluginCheck.ts +++ b/vscode-extension/src/pluginCheck.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import { homedir } from 'os'; const PLUGIN_FILENAME = 'tracybot-oc.js'; -const PLUGIN_URL = 'https://github.com/TracyTeam/tracybot/releases/download/latest/tracybot-oc.js'; +const PLUGIN_URL = 'https://github.com/TracyTeam/tracybot/releases/latest/download/tracybot-oc.js'; const SKIP_CHECK_KEY = 'tracybot.skipPluginCheck'; const Actions = { From 8307ccb3502da9d8fbdcd261bc1000ff9cb14725 Mon Sep 17 00:00:00 2001 From: Max <70238210+cynex0@users.noreply.github.com> Date: Tue, 12 May 2026 22:54:59 +0200 Subject: [PATCH 08/11] ci: use github app to bypass branch protection (#96) --- .github/workflows/release.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89596ab..35ce7a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,9 +24,19 @@ jobs: outputs: tag: ${{ steps.version.outputs.tag }} steps: + # generate a short-lived token from the CI app + - name: Generate GitHub App Token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + + # pass that token to checkout to authorize pushes with protection rule bypass - uses: actions/checkout@v4 with: fetch-depth: 0 + token: ${{ steps.generate-token.outputs.token }} - name: Configure Git User run: | @@ -37,7 +47,7 @@ jobs: id: version working-directory: vscode-extension run: | - NEW_VERSION=$(npm version ${{ inputs.version_bump }} -m "chore: release %s") + NEW_VERSION=$(npm version ${{ inputs.version_bump }} -m "chore: version bump %s") echo "tag=$NEW_VERSION" >> $GITHUB_OUTPUT - name: Push commit and tag to main From 601cea41f93bdd87a195f920160e804f683edae5 Mon Sep 17 00:00:00 2001 From: Max <70238210+cynex0@users.noreply.github.com> Date: Tue, 12 May 2026 23:03:40 +0200 Subject: [PATCH 09/11] ci: explicit checkout to selected branch (#96) --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 35ce7a7..56db835 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,12 +47,13 @@ jobs: id: version working-directory: vscode-extension run: | + git checkout ${{ github.ref_name }} NEW_VERSION=$(npm version ${{ inputs.version_bump }} -m "chore: version bump %s") echo "tag=$NEW_VERSION" >> $GITHUB_OUTPUT - name: Push commit and tag to main run: | - git push origin main + git push origin ${{ github.ref_name }} git push origin ${{ steps.version.outputs.tag }} - name: Create Base GitHub Release From 25154089a1632cdd9872cb6474b81bf7c770c53d Mon Sep 17 00:00:00 2001 From: Max <70238210+cynex0@users.noreply.github.com> Date: Tue, 12 May 2026 23:12:29 +0200 Subject: [PATCH 10/11] ci: explicit commit and tag (#96) --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 56db835..4d73103 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,9 +48,13 @@ jobs: working-directory: vscode-extension run: | git checkout ${{ github.ref_name }} - NEW_VERSION=$(npm version ${{ inputs.version_bump }} -m "chore: version bump %s") + NEW_VERSION=$(npm version ${{ inputs.version_bump }} --no-git-tag-version) echo "tag=$NEW_VERSION" >> $GITHUB_OUTPUT + git add package.json package-lock.json + git commit -m "chore: release $NEW_VERSION" + git tag $NEW_VERSION + - name: Push commit and tag to main run: | git push origin ${{ github.ref_name }} From 02387879d9a3dab1e17d7079d15ffceb1f2e629e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 21:14:47 +0000 Subject: [PATCH 11/11] chore: release v0.0.2 --- vscode-extension/package-lock.json | 4 ++-- vscode-extension/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vscode-extension/package-lock.json b/vscode-extension/package-lock.json index a4f5466..1cf60cb 100644 --- a/vscode-extension/package-lock.json +++ b/vscode-extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "tracybot-extension", - "version": "0.0.1", + "version": "0.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "tracybot-extension", - "version": "0.0.1", + "version": "0.0.2", "dependencies": { "bleu-score": "^1.0.4", "marked": "^4.3.0", diff --git a/vscode-extension/package.json b/vscode-extension/package.json index 16e4ff3..c4ff454 100644 --- a/vscode-extension/package.json +++ b/vscode-extension/package.json @@ -2,7 +2,7 @@ "name": "tracybot-extension", "displayName": "tracybot-extension", "description": "", - "version": "0.0.1", + "version": "0.0.2", "engines": { "vscode": "^1.110.0" },