-
Notifications
You must be signed in to change notification settings - Fork 6
109 lines (92 loc) · 2.5 KB
/
build-cli.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
100
101
102
103
104
105
106
107
108
109
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Build CLI
on:
push:
branches:
- dev
jobs:
windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Dart
uses: dart-lang/setup-dart@v1
- name: Install Dependencies
shell: pwsh
run: |-
cd nyalcf_cli
dart pub get
cd ..
- name: Compile CLI
shell: pwsh
run: |-
cd nyalcf_cli
mkdir build
dart compile exe bin/nyalcf_cli.dart -o build/nyalcf_cli-windows-x64.exe
cd ..
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Windows Artifact
path: nyalcf_cli/build
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Dart
uses: dart-lang/setup-dart@v1
- name: Install Dependencies
run: |-
cd nyalcf_cli
dart pub get
cd ..
- name: Compile CLI
run: |-
cd nyalcf_cli
mkdir -p build
dart compile exe bin/nyalcf_cli.dart -o build/nyalcf_cli-linux-x64
cd ..
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Linux Artifact
path: nyalcf_cli/build
macos:
strategy:
matrix:
os:
- macos-latest
- macos-13
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Dart
uses: dart-lang/setup-dart@v1
- name: Install Dependencies
run: |-
cd nyalcf_cli
dart pub get
cd ..
- name: Compile CLI
run: |-
cd nyalcf_cli
mkdir -p build
dart compile exe bin/nyalcf_cli.dart -o build/nyalcf_cli-macos-${{ matrix.os == 'macos-latest' && 'arm64' || matrix.os == 'macos-13' && 'x64' || matrix.os }}
cd ..
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: MacOS Artifact (${{ matrix.os == 'macos-latest' && 'arm64' || matrix.os == 'macos-13' && 'x64' || matrix.os }})
path: nyalcf_cli/build