88 - " docs/**"
99 - " .vscode/**"
1010 - " .github/**"
11- - " *.md"
1211 - " **/*.md"
1312 pull_request :
1413 branches :
1918jobs :
2019 build :
2120 timeout-minutes : 10
22- runs-on : ${{ matrix.os }}
23- strategy :
24- matrix :
25- os : [ubuntu-latest, windows-latest, macOS-latest]
21+ runs-on : ubuntu-latest
2622 outputs :
2723 taggedbranch : ${{ steps.find-branch.outputs.taggedbranch }}
2824 steps :
29- - uses : actions/checkout@v3
25+ - uses : actions/checkout@v4
3026 - run : git fetch --depth=1 origin +refs/tags/*:refs/tags/*
3127 - name : Find which branch the release tag points at
3228 id : find-branch
33- if : github.event_name == 'release' && runner.os == 'Linux'
29+ if : github.event_name == 'release'
3430 shell : bash
3531 run : |
3632 git fetch --depth=1 origin +refs/heads/*:refs/heads/*
3935 echo "taggedbranch=$TAGGEDBRANCH" >> $GITHUB_OUTPUT
4036 - name : Set an output
4137 id : set-version
42- if : runner.os == 'Linux'
4338 run : |
4439 set -x
4540 VERSION=$(jq -r '.version' package.json | cut -d- -f1)
@@ -59,29 +54,24 @@ jobs:
5954 echo $VERSION > .version
6055 echo $NAME > .name
6156 - name : Use Node.js
62- uses : actions/setup-node@v3
57+ uses : actions/setup-node@v4
6358 with :
64- node-version : 18
59+ node-version : 20
6560 - run : npm install
6661 - name : lint
67- if : runner.os == 'Linux'
6862 run : npm run lint
6963 - run : npm run compile
7064 - name : npm test
71- uses : coactions/setup-xvfb@v1
72- with :
73- run : npm run test
65+ run : xvfb-run npm test
7466 - name : Build pre-release package
75- if : runner.os == 'Linux'
7667 run : |
7768 npx vsce package --pre-release -o ${{ steps.set-version.outputs.name }}.vsix
78- - uses : actions/upload-artifact@v3
79- if : (runner.os == 'Linux') && ( github.event_name != 'release')
69+ - uses : actions/upload-artifact@v4
70+ if : github.event_name != 'release'
8071 with :
8172 name : ${{ steps.set-version.outputs.name }}.vsix
8273 path : ${{ steps.set-version.outputs.name }}.vsix
83- - uses : actions/upload-artifact@v3
84- if : runner.os == 'Linux'
74+ - uses : actions/upload-artifact@v4
8575 with :
8676 name : meta
8777 path : |
@@ -92,24 +82,22 @@ jobs:
9282 runs-on : ubuntu-latest
9383 needs : build
9484 steps :
95- - uses : actions/download-artifact@v3
85+ - uses : actions/download-artifact@v4
9686 with :
9787 name : meta
9888 path : .
9989 - name : Set an output
10090 id : set-version
101- if : runner.os == 'Linux'
10291 run : |
10392 set -x
10493 echo "version=`cat .version`" >> $GITHUB_OUTPUT
10594 echo "name=`cat .name`" >> $GITHUB_OUTPUT
106- - uses : actions/download-artifact@v3
95+ - uses : actions/download-artifact@v4
10796 with :
10897 name : ${{ steps.set-version.outputs.name }}.vsix
10998 - name : Create Pre-Release
11099 id : create-release
111100 uses : softprops/action-gh-release@v1
112- if : runner.os == 'Linux'
113101 with :
114102 tag_name : v${{ steps.set-version.outputs.version }}
115103 prerelease : ${{ github.event_name != 'release' }}
@@ -120,18 +108,18 @@ jobs:
120108 if : github.event_name == 'release' && needs.build.outputs.taggedbranch == 'prerelease'
121109 runs-on : ubuntu-latest
122110 steps :
123- - uses : actions/checkout@v3
111+ - uses : actions/checkout@v4
124112 with :
125113 ref : prerelease
126114 token : ${{ secrets.TOKEN }}
127- - uses : actions/download-artifact@v3
115+ - uses : actions/download-artifact@v4
128116 with :
129117 name : meta
130118 path : .
131119 - name : Use Node.js
132- uses : actions/setup-node@v3
120+ uses : actions/setup-node@v4
133121 with :
134- node-version : 18
122+ node-version : 20
135123 - name : Prepare pre-release build
136124 id : set-version
137125 run : |
@@ -154,7 +142,6 @@ jobs:
154142 - name : Upload Release Asset
155143 id : upload-release-asset
156144 uses : softprops/action-gh-release@v1
157- if : runner.os == 'Linux'
158145 with :
159146 tag_name : ${{ github.event.release.tag_name }}
160147 files : ${{ steps.set-version.outputs.name }}.vsix
0 commit comments