-
Notifications
You must be signed in to change notification settings - Fork 47
58 lines (48 loc) · 2.03 KB
/
build.yml
File metadata and controls
58 lines (48 loc) · 2.03 KB
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
name: Build
on:
push:
branches: [ main, master, dev/** ]
pull_request:
branches: [ main, master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' }}
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
configuration: [Release]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.x'
- name: Install Mono - macOS
if: matrix.os == 'macos-latest'
run: |
brew install --cask mono-mdk
- name: Install Mono - Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt install ca-certificates gnupg
sudo gpg --homedir /tmp --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo chmod +r /usr/share/keyrings/mono-official-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-complete mono-vbnc
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
echo "alias nuget='mono /usr/local/bin/nuget.exe'" >> $HOME/.bashrc
- name: Build and pack
run: make prepare build nuget CONFIGURATION=${{ matrix.configuration }} NUGET="${{ matrix.os == 'ubuntu-latest' && 'mono /usr/local/bin/nuget.exe' || 'nuget' }}"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts-${{ matrix.os }}-${{ matrix.configuration }}
path: |
bin/Nuget/
retention-days: 7