-
Notifications
You must be signed in to change notification settings - Fork 4
99 lines (82 loc) · 2.69 KB
/
main-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
name: Yggdrasil Main Pipeline
env:
GITHUB_REGISTRY: "ghcr.io"
GITHUB_OWNER: "kryptokrona"
GH_TOKEN: ${{ secrets.YGGDRASIL_GH_TOKEN }}
on:
push:
branches:
- main
paths-ignore:
- "*.md"
- ".run/**"
jobs:
build:
name: "Build: ${{ matrix.config.name }} / ${{ matrix.config.platform }}"
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: true
matrix:
config:
- { name: "Windows Latest", os: windows-latest, platform: x64 }
- { name: "Ubuntu Latest", os: ubuntu-latest, platform: x64 }
- { name: "macOS-11", os: macos-11, platform: x64 }
- { name: "macOS Latest", os: macos-latest, platform: arm64 }
env:
PLATFORM: ${{ matrix.config.platform }}
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 16.16.0
- name: Install dependencies
run: npm install --quiet
- name: Build ${{ matrix.config.name }}
if: matrix.config.os == 'windows-latest'
run: npm run build
- name: Build ${{ matrix.config.name }}
if: matrix.config.os == 'ubuntu-latest'
run: npm run build:linux-$PLATFORM
- name: Build ${{ matrix.config.name }}
if: matrix.config.name == 'macOS-11'
run: npm run build:mac-$PLATFORM
- name: Build ${{ matrix.config.name }}
if: matrix.config.name == 'macOS Latest'
run: npm run build:mac-$PLATFORM
- name: "Upload ${{ matrix.config.name }} Artifact"
uses: actions/upload-artifact@v3
if: matrix.config.os == 'windows-latest'
with:
name: windows-latest
path: |
dist/*.exe
- name: "Upload ${{ matrix.config.name }} Deb Artifact"
uses: actions/upload-artifact@v3
if: matrix.config.os == 'ubuntu-latest'
with:
name: ubuntu-latest-deb
path: |
dist/*.deb
- name: "Upload ${{ matrix.config.name }} Snap Artifact"
uses: actions/upload-artifact@v3
if: matrix.config.os == 'ubuntu-latest'
with:
name: ubuntu-latest-snap
path: |
dist/*.snap
- name: "Upload ${{ matrix.config.name }} Artifact"
uses: actions/upload-artifact@v3
if: matrix.config.name == 'macOS-11'
with:
name: macos-11
path: |
dist/*.dmg
- name: "Upload ${{ matrix.config.name }} Artifact"
uses: actions/upload-artifact@v3
if: matrix.config.name == 'macOS Latest'
with:
name: macos-latest
path: |
dist/*.dmg