-
Notifications
You must be signed in to change notification settings - Fork 207
80 lines (69 loc) · 2.21 KB
/
vscode-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: vscode-ci
on:
pull_request:
paths:
- "ext/vscode/**"
- ".github/workflows/vscode-ci.yml"
branches: [main]
permissions:
actions: read
contents: read
id-token: write
jobs:
cspell-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm install -g [email protected]
- name: Spell check for vscode extension
run: cspell lint '**/*.ts' --config ./ext/vscode/.vscode/cspell.yaml --root ./ext/vscode --no-progress
build-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [20.x]
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
upload-artifact: true
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# On push to `main` name the file `azure-dev-latest.vsix` instead of
# `azure-dev-<version>.vsix`
- name: Set package additional arguments
id: package-arguments
uses: actions/github-script@v5
with:
result-encoding: string
script: |
let packageArguments = ''
if (context.eventName == 'workflow_dispatch' || context.eventName == 'push') {
packageArguments = '--out azure-dev-latest.vsix'
}
return packageArguments
- name: Install dependencies
run: |
npm install -g npm
npm ci --no-optional
working-directory: ./ext/vscode
- name: Test
run: ./ci-test.ps1
shell: pwsh
working-directory: ./ext/vscode
- run: ./ci-package.ps1 -PackageArguments "${{ steps.package-arguments.outputs.result }}"
if: matrix.upload-artifact == true
shell: pwsh
working-directory: ./ext/vscode
- name: 'Upload azd binary to artifact store (upload-artifact: true only)'
if: matrix.upload-artifact == true
uses: actions/upload-artifact@v2
with:
name: package
path: ./ext/vscode/azure-dev*.vsix