-
Notifications
You must be signed in to change notification settings - Fork 416
130 lines (114 loc) · 3.7 KB
/
build.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: 'Build'
env:
DotNetVersion: "5.0.300"
DotNetVersion2: "3.1.409"
NuGetVersion: "5.7.0"
MonoVersion: "6.12.0"
Artifacts: ${{ github.workspace }}/artifacts/
Coverage: ${{ github.workspace }}/coverage/
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "true"
defaults:
run:
shell: pwsh
on:
pull_request:
branches:
- master
- feature/*
tags:
- '*'
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-2019, macos-10.15]
name: 'Build'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
clean: 'false'
fetch-depth: '0'
# TODO: Need to figure out the correct way to install mono on linux / mac
# Currently the latest image has mono 6.12
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md
# - name: 🔨 Use Mono ${{ env.MonoVersion }} SDK
# uses: maxim-lobanov/setup-xamarin@v1
# with:
# mono-version: ${{ env.MonoVersion }}
- name: Setup NuGet.exe
uses: nuget/setup-nuget@v1
with:
nuget-version: ${{ env.NuGetVersion }}
- name: 🔨 Use .NET Core 2.1 SDK
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '2.1.x'
- name: 🔨 Use .NET Core ${{ env.DotNetVersion2 }} SDK
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: ${{ env.DotNetVersion2 }}
- name: 🔨 Use .NET Core ${{ env.DotNetVersion }} SDK
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: ${{ env.DotNetVersion }}
- name: 🎁 dotnet tool restore
run: |
dotnet tool restore
- name: 🎁 nuget install
run: |
nuget install tools/packages.config -ExcludeVersion -OutputDirectory tools
# - name: 🍰 Run Cake
# run: |
# dotnet cake --bootstrap
# dotnet cake --configuration=Release --verbosity=Verbose --target=CI --publish-all --archive
- name: 🍰 Run Cake
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
shell: bash
run: |
echo $PATH
chmod 755 ./build.sh
./build.sh --configuration Release --verbosity Verbose --target CI --publish-all --archive
- name: 🍰 Run Cake
if: ${{ runner.os == 'Windows' }}
shell: powershell
run: |
.\build.ps1 -configuration Release -verbosity Verbose -target CI --publish-all --archive
- name: ⬆ Publish Logs
uses: actions/upload-artifact@v2
continue-on-error: true
if: ${{ always() }}
with:
name: 'logs - ${{ github.workflow }} ${{ matrix.os }}'
path: '${{ env.Artifacts }}/logs/'
- name: ⬆ Publish Packages
uses: actions/upload-artifact@v2
continue-on-error: true
if: ${{ always() }}
with:
name: 'packages'
path: '${{ env.Artifacts }}/package/'
- name: ⬆ Publish Deployment
uses: actions/upload-artifact@v2
continue-on-error: true
if: ${{ always() }}
with:
name: 'deployment'
path: '${{ env.Artifacts }}/deployment/'
- name: ⬆ Publish NuGet
uses: actions/upload-artifact@v2
continue-on-error: true
if: ${{ always() }}
with:
name: 'nuget'
path: '${{ env.Artifacts }}/nuget/'
- name: ⬆ Publish Scripts
uses: actions/upload-artifact@v2
continue-on-error: true
if: ${{ always() }}
with:
name: 'scripts - ${{ matrix.os }}'
path: '${{ env.Artifacts }}/scripts/'