-
Notifications
You must be signed in to change notification settings - Fork 7
48 lines (39 loc) · 1.12 KB
/
publish.yml
File metadata and controls
48 lines (39 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Publish Extension
on:
push:
tags:
- "v*.*.*" # Trigger on new version tags
workflow_dispatch:
jobs:
publish:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Node.js with pnpm
uses: actions/setup-node@v6
with:
node-version: 22.x
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Lint code
run: pnpm run lint
- name: Check types
run: pnpm run check-types
- name: Build the extension
run: pnpm run build
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
id: publishToOpenVSX
with:
pat: ${{ secrets.OVSX_PAT }}
- name: Publish to VS Code Marketplace
if: secrets.VSCE_PAT != ''
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VSCE_PAT }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}