-
Notifications
You must be signed in to change notification settings - Fork 15
45 lines (35 loc) · 1.04 KB
/
main.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
name: CI
on:
push:
branches: [ main, v2 ]
pull_request:
branches: [ main, v2 ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
- name: set api key
env:
APP_INSIGHTS_KEY: ${{ secrets.AZURE_APP_INSIGHTS_API_KEY }}
run: echo "export const appinsights_key = \"$APP_INSIGHTS_KEY\";" > src-packed/secrets.js
- name: npm install
run: npm install
- name: build extension
run: npx xt-build
- name: run tests
run: npx xt-test
# Upload unzipped artifact content to avoid creating a nested .zip artifact
- name: unzip release.zip
run: unzip release.zip -d unzipped-release
- name: archive release.zip
uses: actions/upload-artifact@v2
with:
name: release
path: unzipped-release
if-no-files-found: error