Repository navigation
68 lines (64 loc) · 1.92 KB
/
Copy pathci.yml
File metadata and controls
68 lines (64 loc) · 1.92 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
61
62
63
64
65
66
67
68
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm test
- name: Extension host (Linux)
if: runner.os == 'Linux'
run: xvfb-run -a npm run test:integration
- name: Extension host (Windows)
if: runner.os == 'Windows'
run: npm run test:integration
- run: npm audit --audit-level=low
- run: npm run package
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: vsix-${{ matrix.os }}
path: '*.vsix'
if-no-files-found: error
release:
name: Publish GitHub release
needs: test
if: github.event_name == 'push' && startsWith(github.event.head_commit.message, 'release:')
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: 24
package-manager-cache: false
- run: npm ci
- run: npm run package
- name: Create draft, attach assets, and publish
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
RELEASE_COMMIT: ${{ github.sha }}
run: node scripts/publish-release.cjs