forked from kintsoogi/translation-notes-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (45 loc) · 1.63 KB
/
build.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
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
# runs-on: macos-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Read version and commit sha
run: |
echo "HASH=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV
echo "APP_VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
echo "APP_NAME=$(node -p -e "require('./package.json').name")" >> $GITHUB_ENV
- name: Install yarn
run: npm i -g yarn
- run: yarn --version
- name: Install pnpm
run: npm install --global pnpm
- run: pnpm --version
- name: Install vsce
run: npm install -g @vscode/vsce
- name: Install Dependencies and build webview
run: npm run pre-package:webview
- name: Install Extension Dependencies
run: npm run install:extension
- name: Run Unit Tests with emulated X server
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" \
npm run test:unit
- name: Package Extension
run: yarn run package:extension
- name: Set artifact name
run: echo "ARTIFACT_NAME=$(echo "$APP_NAME-$APP_VERSION-$HASH.vsix")" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
name: Upload Package
with:
name: ${{ env.ARTIFACT_NAME }}
path: ./checking-extension-*.vsix