-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1.27 KB
/
dotnetcore.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
name: .NET
on: [push, pull_request]
env:
DOTNET_VER: 7.x.x
jobs:
build:
name: Build Project
# Just run on ubuntu. It builds faster than Windows, and the result will most likely be the same.
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Check .NET Cache
id: dotnet-cache
uses: actions/cache@v3
with:
path: ~/.dotnet/
key: ${{ runner.os }}-dotnet-${{ env.DOTNET_VER }}
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VER }}
- name: Setup .NET Workloads
run: dotnet workload install macos
- name: Setup Custom NuGet Sources
run: dotnet nuget add source https://www.myget.org/F/discord-net/api/v3/index.json
- name: Check NuGet Cache
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: ${{ runner.os }}-nuget-
- name: Restore
run: dotnet restore --force-evaluate
- name: Building
run: dotnet build --configuration Release --no-restore