Skip to content

Commit 226fd72

Browse files
committed
Fix CI/CD workflows - Node.js version and vsce compatibility
- Updated Node.js from v18 to v20 to fix vsce undici/File reference error - Pinned vsce version to 2.24.0 for stability - Added simple build workflow as backup - Fixed both build-and-publish and create-release workflows
1 parent 491698c commit 226fd72

File tree

3 files changed

+58
-6
lines changed

3 files changed

+58
-6
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Setup Node.js
2020
uses: actions/setup-node@v4
2121
with:
22-
node-version: '18'
22+
node-version: '20'
2323
cache: 'npm'
2424

2525
- name: Install dependencies
@@ -29,7 +29,7 @@ jobs:
2929
run: npm run compile
3030

3131
- name: Install vsce (VS Code Extension Manager)
32-
run: npm install -g @vscode/vsce
32+
run: npm install -g @vscode/vsce@2.24.0
3333

3434
- name: Package extension
3535
run: vsce package --no-dependencies
@@ -53,7 +53,7 @@ jobs:
5353
- name: Setup Node.js
5454
uses: actions/setup-node@v4
5555
with:
56-
node-version: '18'
56+
node-version: '20'
5757
cache: 'npm'
5858

5959
- name: Install dependencies
@@ -63,7 +63,7 @@ jobs:
6363
run: npm run compile
6464

6565
- name: Install vsce (VS Code Extension Manager)
66-
run: npm install -g @vscode/vsce
66+
run: npm install -g @vscode/vsce@2.24.0
6767

6868
- name: Publish to VS Code Marketplace
6969
run: vsce publish --no-dependencies

.github/workflows/build-simple.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build Extension (Simple)
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Compile TypeScript
28+
run: npm run compile
29+
30+
- name: Package extension (using npm script)
31+
run: npm run package
32+
33+
- name: List created files
34+
run: ls -la *.vsix
35+
36+
- name: Upload VSIX artifact
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: xaf-modeleditor-extension
40+
path: "*.vsix"
41+
retention-days: 30
42+
43+
- name: Upload extension info
44+
run: |
45+
echo "Extension packaged successfully!" >> $GITHUB_STEP_SUMMARY
46+
echo "**Files created:**" >> $GITHUB_STEP_SUMMARY
47+
ls -la *.vsix >> $GITHUB_STEP_SUMMARY
48+
echo "" >> $GITHUB_STEP_SUMMARY
49+
echo "**Manual publish instructions:**" >> $GITHUB_STEP_SUMMARY
50+
echo "1. Download the VSIX file from the artifacts" >> $GITHUB_STEP_SUMMARY
51+
echo "2. Go to https://marketplace.visualstudio.com/manage" >> $GITHUB_STEP_SUMMARY
52+
echo "3. Upload the VSIX file manually" >> $GITHUB_STEP_SUMMARY

.github/workflows/create-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Setup Node.js
2424
uses: actions/setup-node@v4
2525
with:
26-
node-version: '18'
26+
node-version: '20'
2727
cache: 'npm'
2828

2929
- name: Install dependencies
@@ -33,7 +33,7 @@ jobs:
3333
run: npm run compile
3434

3535
- name: Install vsce
36-
run: npm install -g @vscode/vsce
36+
run: npm install -g @vscode/vsce@2.24.0
3737

3838
- name: Update package.json version
3939
run: |

0 commit comments

Comments
 (0)