forked from ChelseaKR/tods-validate
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (56 loc) · 1.73 KB
/
Copy pathvscode-extension.yml
File metadata and controls
60 lines (56 loc) · 1.73 KB
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
name: VS Code extension
on:
pull_request:
paths:
- "editor/vscode/**"
- ".github/workflows/vscode-extension.yml"
push:
branches: [main]
paths:
- "editor/vscode/**"
- ".github/workflows/vscode-extension.yml"
workflow_dispatch:
# Cancel superseded runs of the same ref (CICD §11c).
concurrency:
group: vscode-extension-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
package:
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: editor/vscode
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
cache: npm
cache-dependency-path: editor/vscode/package-lock.json
- name: Install locked dependencies
run: npm ci --ignore-scripts
- name: Type-check
run: npm run check
- name: Audit dependencies
run: npm audit --audit-level=high
- name: Package VSIX
run: npm run package
- name: Verify VSIX contents
run: |
set -eu
vsix="$(find . -maxdepth 1 -name 'tods-validate-*.vsix' -print -quit)"
test -n "$vsix"
unzip -Z1 "$vsix" | grep -Fx 'extension/LICENSE.txt'
unzip -Z1 "$vsix" | grep -Fx 'extension/out/extension.js'
- name: Upload VSIX
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: tods-validate-vsix
path: editor/vscode/tods-validate-*.vsix
if-no-files-found: error
retention-days: 14