Skip to content

Commit bf5ede1

Browse files
authored
Update CI (#1352)
1 parent e4ddce9 commit bf5ede1

File tree

3 files changed

+34
-60
lines changed

3 files changed

+34
-60
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ jobs:
3535

3636
steps:
3737
- name: Checkout repository
38-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
3939

4040
# Initializes the CodeQL tools for scanning.
4141
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v2
42+
uses: github/codeql-action/init@v3
4343
with:
4444
languages: ${{ matrix.language }}
4545
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -50,7 +50,7 @@ jobs:
5050
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5151
# If this step fails, then you should remove it and run the build manually (see below)
5252
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v2
53+
uses: github/codeql-action/autobuild@v3
5454

5555
# ℹ️ Command-line programs to run using the OS shell.
5656
# 📚 https://git.io/JvXDl
@@ -64,4 +64,4 @@ jobs:
6464
# make release
6565

6666
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v2
67+
uses: github/codeql-action/analyze@v3

.github/workflows/main.yml

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
- "docs/**"
99
- ".vscode/**"
1010
- ".github/**"
11-
- "*.md"
1211
- "**/*.md"
1312
pull_request:
1413
branches:
@@ -24,18 +23,15 @@ concurrency:
2423
jobs:
2524
build:
2625
timeout-minutes: 10
27-
runs-on: ${{ matrix.os }}
28-
strategy:
29-
matrix:
30-
os: [ubuntu-latest, windows-latest, macOS-latest]
26+
runs-on: ubuntu-latest
3127
outputs:
3228
taggedbranch: ${{ steps.find-branch.outputs.taggedbranch }}
3329
steps:
34-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
3531
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
3632
- name: Find which branch the release tag points at
3733
id: find-branch
38-
if: github.event_name == 'release' && runner.os == 'Linux'
34+
if: github.event_name == 'release'
3935
shell: bash
4036
run: |
4137
git fetch --depth=1 origin +refs/heads/*:refs/heads/*
@@ -44,7 +40,6 @@ jobs:
4440
echo "taggedbranch=$TAGGEDBRANCH" >> $GITHUB_OUTPUT
4541
- name: Set an output
4642
id: set-version
47-
if: runner.os == 'Linux'
4843
run: |
4944
set -x
5045
VERSION=$(jq -r '.version' package.json | cut -d- -f1)
@@ -64,29 +59,24 @@ jobs:
6459
echo $VERSION > .version
6560
echo $NAME > .name
6661
- name: Use Node.js
67-
uses: actions/setup-node@v3
62+
uses: actions/setup-node@v4
6863
with:
69-
node-version: 18
64+
node-version: 20
7065
- run: npm install
7166
- name: lint
72-
if: runner.os == 'Linux'
7367
run: npm run lint
7468
- run: npm run compile
7569
- name: npm test
76-
uses: coactions/setup-xvfb@v1
77-
with:
78-
run: npm run test
70+
run: xvfb-run npm test
7971
- name: Build package
80-
if: runner.os == 'Linux'
8172
run: |
8273
npx vsce package -o ${{ steps.set-version.outputs.name }}.vsix
83-
- uses: actions/upload-artifact@v3
84-
if: (runner.os == 'Linux') && (github.event_name != 'release')
74+
- uses: actions/upload-artifact@v4
75+
if: github.event_name != 'release'
8576
with:
8677
name: ${{ steps.set-version.outputs.name }}.vsix
8778
path: ${{ steps.set-version.outputs.name }}.vsix
88-
- uses: actions/upload-artifact@v3
89-
if: runner.os == 'Linux'
79+
- uses: actions/upload-artifact@v4
9080
with:
9181
name: meta
9282
path: |
@@ -97,24 +87,22 @@ jobs:
9787
runs-on: ubuntu-latest
9888
needs: build
9989
steps:
100-
- uses: actions/download-artifact@v3
90+
- uses: actions/download-artifact@v4
10191
with:
10292
name: meta
10393
path: .
10494
- name: Set an output
10595
id: set-version
106-
if: runner.os == 'Linux'
10796
run: |
10897
set -x
10998
echo "version=`cat .version`" >> $GITHUB_OUTPUT
11099
echo "name=`cat .name`" >> $GITHUB_OUTPUT
111-
- uses: actions/download-artifact@v3
100+
- uses: actions/download-artifact@v4
112101
with:
113102
name: ${{ steps.set-version.outputs.name }}.vsix
114103
- name: Create Release
115104
id: create-release
116105
uses: softprops/action-gh-release@v1
117-
if: runner.os == 'Linux'
118106
with:
119107
tag_name: v${{ steps.set-version.outputs.version }}
120108
prerelease: ${{ github.event_name != 'release' }}
@@ -125,18 +113,18 @@ jobs:
125113
if: github.event_name == 'release' && needs.build.outputs.taggedbranch == 'master'
126114
runs-on: ubuntu-latest
127115
steps:
128-
- uses: actions/checkout@v3
116+
- uses: actions/checkout@v4
129117
with:
130118
ref: master
131119
token: ${{ secrets.TOKEN }}
132-
- uses: actions/download-artifact@v3
120+
- uses: actions/download-artifact@v4
133121
with:
134122
name: meta
135123
path: .
136124
- name: Use Node.js
137-
uses: actions/setup-node@v3
125+
uses: actions/setup-node@v4
138126
with:
139-
node-version: 18
127+
node-version: 20
140128
- name: Prepare build
141129
id: set-version
142130
run: |
@@ -159,7 +147,6 @@ jobs:
159147
- name: Upload Release Asset
160148
id: upload-release-asset
161149
uses: softprops/action-gh-release@v1
162-
if: runner.os == 'Linux'
163150
with:
164151
tag_name: ${{ github.event.release.tag_name }}
165152
files: ${{ steps.set-version.outputs.name }}.vsix

.github/workflows/prerelease.yml

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
- "docs/**"
99
- ".vscode/**"
1010
- ".github/**"
11-
- "*.md"
1211
- "**/*.md"
1312
pull_request:
1413
branches:
@@ -19,18 +18,15 @@ on:
1918
jobs:
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/*
@@ -39,7 +35,6 @@ jobs:
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

Comments
 (0)