-
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.65 KB
/
dotnet.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
name: .NET Core Desktop Build
env:
NUGET_SERVER_URL: "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
NUGET_CONFIG: "../NuGet.config"
GH_TOKEN: ${{ secrets.LATENCY_PAT }}
on:
push:
branches: master
pull_request:
workflow_dispatch:
jobs:
build:
if: ${{ startsWith(github.ref, 'refs/tags/') == false }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [self-hosted] #, ubuntu-latest, windows-latest]
BuildConfiguration: [ Release ]
max-parallel: 2
steps:
- name: Copy NuGet.Config Template
shell: bash
run: |
cp ../NuGet.Config.template ../NuGet.Config
- name: Update NuGet Config
shell: bash
run: |
nuget config -Set defaultPushSource="${{ env.NUGET_SERVER_URL }}" -ConfigFile ${{ env.NUGET_CONFIG }}
dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.NUGET_AUTH_TOKEN }} --protocol-version 3 --configfile ${{ env.NUGET_CONFIG }} --store-password-in-clear-text --name github "${{ env.NUGET_SERVER_URL }}"
- uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- uses: actions/setup-dotnet@v4.0.0
if: matrix.os != 'self-hosted'
with:
dotnet-version: '8.0.x'
dotnet-quality: 'signed'
source-url: ${{ env.NUGET_SERVER_URL }}
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_AUTH_TOKEN }}
- name: Restore dependencies
run: dotnet restore
- name: Build
id: build
run: |
dotnet build --no-restore --configuration ${{ matrix.BuildConfiguration }}