Skip to content

Commit dd032a2

Browse files
committed
ci: publish to marketplace on release
1 parent 833741a commit dd032a2

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
branches:
77
- main
88
- master
9+
release:
10+
types:
11+
- published
912
workflow_dispatch:
1013
inputs:
1114
neva_ref:
@@ -139,3 +142,30 @@ jobs:
139142
name: vscode-neva-vsix
140143
path: '*.vsix'
141144
if-no-files-found: error
145+
146+
publish-marketplace:
147+
name: Publish to VS Code Marketplace
148+
needs:
149+
- build-extension
150+
if: github.event_name == 'release'
151+
runs-on: ubuntu-latest
152+
153+
steps:
154+
- name: Setup Node
155+
uses: actions/setup-node@v4
156+
with:
157+
node-version: ${{ env.NODE_VERSION }}
158+
159+
- name: Download VSIX artifact
160+
uses: actions/download-artifact@v4
161+
with:
162+
name: vscode-neva-vsix
163+
path: dist
164+
165+
- name: Publish to Marketplace
166+
env:
167+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
168+
run: |
169+
test -n "$VSCE_PAT"
170+
VSIX_FILE=$(ls -1 dist/*.vsix | head -n 1)
171+
npx vsce publish --packagePath "$VSIX_FILE" -p "$VSCE_PAT"

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ If you use VSCode, you can use `Run Extension` debug task. This will allow to sp
1919
After you make changes to LSP-server, make sure you compile binaries for all supported platforms and put them into `bin` directory in this repo. When you'll use `make pkg` the `vsce` will pack those binaries into vscode extension archive.
2020

2121
In CI, LSP binaries are built from `nevalang/neva-lsp` directly (see `.github/workflows/ci.yml`) and downloaded into `bin/` before packaging. No git submodule is required.
22+
Marketplace publishing is release-only: the workflow publishes to VS Code Marketplace on `release.published` using the `VSCE_PAT` repository secret.
2223

2324
### Testing
2425

0 commit comments

Comments
 (0)