Skip to content

Commit 7726bd5

Browse files
feat: auto-publish VSCode extension to marketplace on release
1 parent 16f2f57 commit 7726bd5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ jobs:
199199

200200
publish-vscode:
201201
name: Publish VSCode Extension
202-
needs: [build-vscode-extension]
202+
needs: [create-release]
203203
runs-on: ubuntu-latest
204-
if: inputs.publish_vscode == true
204+
if: startsWith(github.ref, 'refs/tags/v')
205205

206206
steps:
207207
- name: Download VSCode extension
@@ -214,4 +214,9 @@ jobs:
214214
run: npm install -g vsce
215215

216216
- name: Publish to marketplace
217-
run: vsce publish --packagePath *.vsix --pat ${{ secrets.VSCE_TOKEN }}
217+
if: ${{ secrets.VSCE_TOKEN != '' }}
218+
run: vsce publish --packagePath *.vsix --pat ${{ secrets.VSCE_TOKEN }}
219+
220+
- name: Skip marketplace publish
221+
if: ${{ secrets.VSCE_TOKEN == '' }}
222+
run: echo "⚠️ VSCE_TOKEN not set, skipping marketplace publish. Extension is available in GitHub release."

0 commit comments

Comments
 (0)