Skip to content

Commit 2f24ea1

Browse files
ryanbas21claude
andcommitted
fix: stamp VS Code extension version for snapshot publishes
vsce rejects publish when the version already exists on the marketplace. Stamp package.json with BUILD_NUMBER as a 4th segment (e.g. 0.1.0.42) before publishing, matching the Chrome extension approach. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8100db6 commit 2f24ea1

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ jobs:
7474
api-key: ${{ secrets.AMO_JWT_ISSUER }}
7575
api-secret: ${{ secrets.AMO_JWT_SECRET }}
7676

77+
- name: Stamp VS Code extension version
78+
if: inputs.extension
79+
working-directory: packages/vscode-extension
80+
env:
81+
BUILD_NUMBER: ${{ github.run_number }}
82+
run: |
83+
BASE=$(node -p "require('./package.json').version")
84+
npm version "${BASE}.${BUILD_NUMBER}" --no-git-tag-version
85+
7786
- name: Publish VS Code extension (pre-release)
7887
if: inputs.extension
7988
working-directory: packages/vscode-extension

0 commit comments

Comments
 (0)