-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (62 loc) · 1.83 KB
/
go.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
name: Go CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macos-latest, windows-latest]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set up latest Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
cache: true
go-version: ^1.19
id: go
- name: Download DLLs for Windows
run: >
C:\msys64\usr\bin\wget.exe https://github.com/webview/webview_csharp/raw/master/libs/webview.dll
https://github.com/webview/webview_csharp/raw/master/libs/WebView2Loader.dll
if: ${{ success() && matrix.os == 'windows-latest' }}
- name: Install dependencies on Ubuntu
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends libwebkit2gtk-4.0-dev
if: ${{ success() && matrix.os == 'ubuntu-18.04' }}
- name: Get dependencies
run: |
corepack enable
yarn install --immutable
go get -v -t -d ./...
- name: Build
run: yarn build
- name: Test
run: yarn lint && go test -v .
- name: Upload Build Artifact (Linux/macOS)
uses: actions/upload-artifact@v2.1.4
if: ${{ success() && matrix.os != 'windows-latest' }}
with:
name: writer-${{ runner.os }}
path: writer
- name: Upload Build Artifact (Windows)
uses: actions/upload-artifact@v2.1.4
if: ${{ success() && matrix.os == 'windows-latest' }}
with:
name: writer-${{ runner.os }}
path: |
launcher.exe
writer.exe
webview.dll
WebView2Loader.dll