-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (62 loc) · 1.7 KB
/
ci.yaml
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
name: Build
on:
push:
branches: [main]
tags: [v*]
pull_request:
branches: [main]
env:
WEBMESH_VERSION: main
WEBMESHD_BUILD_ARGS: --snapshot --clean --id webmeshd
GH_TOKEN: ${{ github.token }}
jobs:
build:
name: Build Package
strategy:
fail-fast: false
matrix:
target: [linux, mac, win]
include:
- target: linux
runner: ${{ vars.LINUX_BUILD_PLATFORM }}
- target: mac
runner: ${{ vars.MACOS_BUILD_PLATFORM }}
- target: win
runner: ${{ vars.WINDOWS_BUILD_PLATFORM }}
runs-on: ${{ matrix.runner }}
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout Webmesh
uses: actions/checkout@v4
with:
repository: webmeshproj/webmesh
ref: ${{ env.WEBMESH_VERSION }}
path: webmesh
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: stable
check-latest: true
cache: ${{ !startswith(matrix.runner, 'self-hosted') }}
cache-dependency-path: webmesh/go.sum
- name: Setup Node
uses: actions/setup-node@v3
with:
check-latest: true
node-version-file: .nvmrc
- name: Build Webmesh Helper Daemon
if: ${{ matrix.target != 'linux' }}
uses: goreleaser/goreleaser-action@v5
with:
version: latest
workdir: webmesh
args: build ${{ env.WEBMESHD_BUILD_ARGS }}
- name: Build Electron App
run: yarn && yarn build:${{ matrix.target }}