From 58df63f3796da391080d8c1c5d73f32fa544eccf Mon Sep 17 00:00:00 2001 From: Ryan Bas Date: Tue, 12 May 2026 12:50:46 -0600 Subject: [PATCH 1/2] fix(ci): use semver-compatible version for VS Code extension stamp VS Code Marketplace requires strict semver (MAJOR.MINOR.PATCH). Replace 4-segment version (0.1.0.46) with 3-segment (0.1.46) by setting patch to the build number instead of appending a 4th segment. Co-Authored-By: Claude Opus 4.6 (1M context) --- .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 2b42a80..8cbf1dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,7 +83,8 @@ jobs: node -e " const fs = require('fs'); const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); - pkg.version = pkg.version + '.' + process.env.BUILD_NUMBER; + const [major, minor] = pkg.version.split('.'); + pkg.version = major + '.' + minor + '.' + process.env.BUILD_NUMBER; fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); " From d3de900cd272ce0ba40b21931019886f466e65a1 Mon Sep 17 00:00:00 2001 From: Ryan Bas Date: Tue, 12 May 2026 13:12:11 -0600 Subject: [PATCH 2/2] refactor(ci): decouple VS Code extension publishing - Remove VS Code snapshot stamp + publish from release.yml snapshot job - Remove publish-vscode job from publish-extension.yml - Add standalone publish-vscode.yml triggered by workflow_dispatch VS Code extension releases are now fully manual: bump version in package.json, merge, then trigger the workflow. This avoids the semver/4-segment version conflicts and decouples VS Code from the npm/Chrome/Firefox release pipeline. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/publish-extension.yml | 23 ---------- .github/workflows/publish-vscode.yml | 28 +++++++++++++ .github/workflows/release.yml | 56 ------------------------- 3 files changed, 28 insertions(+), 79 deletions(-) create mode 100644 .github/workflows/publish-vscode.yml diff --git a/.github/workflows/publish-extension.yml b/.github/workflows/publish-extension.yml index 2311959..b36f61d 100644 --- a/.github/workflows/publish-extension.yml +++ b/.github/workflows/publish-extension.yml @@ -102,26 +102,3 @@ jobs: manifest: packages/devtools-extension/dist/manifest.json api-key: ${{ secrets.AMO_JWT_ISSUER }} api-secret: ${{ secrets.AMO_JWT_SECRET }} - - publish-vscode: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v4 - with: - node-version: 24 - cache: pnpm - - - run: pnpm install --frozen-lockfile - - - name: Build all packages - run: pnpm build - - - name: Publish to VS Code Marketplace - working-directory: packages/vscode-extension - run: pnpm vsce publish --no-dependencies --pat "$VSCE_PAT" - env: - VSCE_PAT: ${{ secrets.VSCE_PAT }} diff --git a/.github/workflows/publish-vscode.yml b/.github/workflows/publish-vscode.yml new file mode 100644 index 0000000..31f5872 --- /dev/null +++ b/.github/workflows/publish-vscode.yml @@ -0,0 +1,28 @@ +name: Publish VS Code Extension + +on: + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 24 + cache: pnpm + + - run: pnpm install --frozen-lockfile + + - name: Build all packages + run: pnpm build + + - name: Publish to VS Code Marketplace + working-directory: packages/vscode-extension + run: pnpm vsce publish --no-dependencies --pat "$VSCE_PAT" + env: + VSCE_PAT: ${{ secrets.VSCE_PAT }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8cbf1dc..b1a5cf4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,6 @@ name: Release on: workflow_dispatch: - inputs: - extension: - description: Publish Firefox + VS Code extensions (snapshot) - type: boolean - default: true push: branches: [main] @@ -38,63 +33,12 @@ jobs: - name: Build run: pnpm build - env: - BUILD_NUMBER: ${{ github.run_number }} - SNAPSHOT: 'true' - name: Publish npm snapshots run: pnpm changeset publish --tag snapshot env: NPM_CONFIG_PROVENANCE: true - - name: Build Firefox extension - if: inputs.extension - working-directory: packages/devtools-extension - run: node --experimental-strip-types build.mjs --target=firefox - env: - BUILD_NUMBER: ${{ github.run_number }} - SNAPSHOT: 'true' - - - name: Zip Firefox extension - if: inputs.extension - working-directory: packages/devtools-extension - run: cd dist && zip -r ../extension-firefox.zip . - - - name: Zip source for AMO review - if: inputs.extension - run: zip -r source.zip . -x 'node_modules/*' '*/node_modules/*' '*/dist/*' '.git/*' '*.zip' - - - name: Publish Firefox extension (unlisted) - if: inputs.extension - uses: trmcnvn/firefox-addon@0d05671269b82c69c3f22ed86d8e772e89d47cf4 # v1 - with: - uuid: oidc-devtool@wolfcola - xpi: packages/devtools-extension/extension-firefox.zip - manifest: packages/devtools-extension/dist/manifest.json - api-key: ${{ secrets.AMO_JWT_ISSUER }} - api-secret: ${{ secrets.AMO_JWT_SECRET }} - - - name: Stamp VS Code extension version - if: inputs.extension - working-directory: packages/vscode-extension - env: - BUILD_NUMBER: ${{ github.run_number }} - run: | - node -e " - const fs = require('fs'); - const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); - const [major, minor] = pkg.version.split('.'); - pkg.version = major + '.' + minor + '.' + process.env.BUILD_NUMBER; - fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); - " - - - name: Publish VS Code extension (pre-release) - if: inputs.extension - working-directory: packages/vscode-extension - run: pnpm vsce publish --no-dependencies --pre-release --pat "$VSCE_PAT" - env: - VSCE_PAT: ${{ secrets.VSCE_PAT }} - release: if: github.event_name == 'push' runs-on: ubuntu-latest