Skip to content

Commit 2ff5ab6

Browse files
committed
ci(workflow): use Node 20 and add npx vsce fallback
1 parent 60be674 commit 2ff5ab6

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/package-vsce.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
- name: Checkout repository
1515
uses: actions/checkout@v4
1616

17-
- name: Use Node.js 18
17+
- name: Use Node.js 20
1818
uses: actions/setup-node@v4
1919
with:
20-
node-version: 18
20+
node-version: 20
2121

2222
- name: Install dependencies (if any)
2323
run: |
@@ -30,8 +30,14 @@ jobs:
3030
id: package
3131
run: |
3232
# create package and capture produced filename
33-
vsce package
34-
echo "vsix_file=$(ls -1 *.vsix | head -n 1)" >> $GITHUB_OUTPUT
33+
set -o pipefail
34+
if vsce package; then
35+
echo "vsix_file=$(ls -1 *.vsix | head -n 1)" >> $GITHUB_OUTPUT
36+
else
37+
echo "global vsce failed, trying npx @vscode/vsce..."
38+
npx --yes @vscode/vsce package
39+
echo "vsix_file=$(ls -1 *.vsix | head -n 1)" >> $GITHUB_OUTPUT
40+
fi
3541
3642
- name: Upload VSIX artifact
3743
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)