This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (127 loc) · 3.77 KB
/
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: CI
on:
push:
branches:
- main
tags: ['*']
pull_request:
# This is to catch new releases of VS Code which could cause the extension to break
schedule:
- cron: 0 0 * * *
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Volta, Node and NPM
uses: volta-cli/action@v4
- run: npm ci
env:
npm_config_arch: x64
- name: Run headless test
uses: coactions/setup-xvfb@v1
with:
run: npm test
build:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: win32-x64
npm_config_arch: x64
- os: windows-latest
target: win32-arm64
npm_config_arch: arm
- os: ubuntu-latest
target: linux-x64
npm_config_arch: x64
- os: ubuntu-latest
target: linux-arm64
npm_config_arch: arm64
- os: ubuntu-latest
target: linux-armhf
npm_config_arch: arm
- os: ubuntu-latest
target: alpine-x64
npm_config_arch: x64
- os: macos-latest
target: darwin-x64
npm_config_arch: x64
- os: macos-latest
target: darwin-arm64
npm_config_arch: arm64
- os: ubuntu-latest
target: universal
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup Volta, Node and NPM
uses: volta-cli/action@v4
- if: matrix.target != 'universal'
name: Install dependencies (with binaries)
run: npm ci
env:
npm_config_arch: ${{ matrix.npm_config_arch }}
- if: matrix.target == 'universal'
name: Install dependencies (without binaries)
run: npm ci
env:
BINDL_SKIP: 'true'
- run: npx semantic-release --extends ./package.release.config.js
env:
VSCE_TARGET: ${{ matrix.target }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: '*.vsix'
release:
if: github.event_name != 'schedule'
needs: [test, build]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Volta, Node and NPM
uses: volta-cli/action@v4
- run: npm ci
env:
BINDL_SKIP: 'true'
- uses: actions/download-artifact@v4
# Only run on push events or pull requests coming from the same repository, except from dependabot
- run: npx semantic-release --extends ./publish.release.config.js
if: github.event_name == 'push' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
docs:
if: github.event_name != 'schedule'
needs: [test, build]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Volta, Node and NPM
uses: volta-cli/action@v4
- run: npm ci
- name: Build docs
run: npm run docs
- name: Deploy docs
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
folder: docs