-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (42 loc) · 1.42 KB
/
Copy pathpublish.yml
File metadata and controls
50 lines (42 loc) · 1.42 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
49
50
name: Publish Extension
on:
# Trigger the workflow on git tag push matching the v* pattern (e.g., v0.1.5, v1.0.0)
push:
tags:
- "v*"
permissions:
contents: read
jobs:
publish:
name: Publish to Marketplaces
runs-on: ubuntu-latest
environment: ilseoblee
steps:
# Step 1: Checkout the source code from the repository
- name: Checkout code
uses: actions/checkout@v4
# Step 2: Set up Node.js environment (version 20 as required by devDependencies)
# Includes npm cache for faster subsequent runs
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
# Step 3: Install project dependencies using clean install
- name: Install dependencies
run: npm ci
# Step 4: Run the build and package step to generate the extension bundle
- name: Build and package extension
run: npm run package
# Step 5: Publish to VS Code Marketplace
- name: Publish to VS Code Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VSCE_PAT }}
registryUrl: https://marketplace.visualstudio.com
# Step 6: Publish to Open VSX Registry
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OVSX_TOKEN }}
registryUrl: https://open-vsx.org