Skip to content

Commit e235e3d

Browse files
committed
chore: add GitHub Actions workflow for publishing extension
1 parent 8054123 commit e235e3d

File tree

3 files changed

+49
-4
lines changed

3 files changed

+49
-4
lines changed

.github/workflows/publish.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish Extension
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
7+
jobs:
8+
build-and-publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 20
21+
cache: 'npm'
22+
23+
- name: Install Dependencies
24+
run: npm install
25+
26+
- name: Start Xvfb
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y xvfb
30+
export DISPLAY=:99.0
31+
Xvfb :99 -screen 0 1920x1080x24 > /dev/null 2>&1 &
32+
33+
- name: Run Tests
34+
run: xvfb-run -a npm test
35+
36+
- name: Compile Extension
37+
run: npm run compile
38+
39+
- name: Install VSCE
40+
run: npm install -g @vscode/vsce
41+
42+
- name: Publish to VSCode Marketplace
43+
run: vsce publish -p ${{ secrets.VSC_TOKEN }}

package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
"pretest": "npm run compile-tests && npm run compile && npm run lint",
101101
"lint": "eslint src",
102102
"test": "vscode-test",
103+
"test:no-sandbox": "vscode-test --no-sandbox",
103104
"test:integration": "npm run compile:test && vscode-test --label integration",
104105
"test:unit": "npm run compile:test && vscode-test --label unit",
105106
"compile:test": "tsc -p . --outDir out"

0 commit comments

Comments
 (0)