-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (45 loc) · 1.46 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
59
60
61
62
name: .NET
on:
push:
branches: [ main, dev, feature/*, fix/*, release/* ]
pull_request:
branches: [ main ]
release:
types: [ published ]
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
# Create Local NuGet Source
- name: Create Local NuGet Directory
run: mkdir ~/nuget
- name: Add Local Nuget Source
run: dotnet nuget add source ~/nuget
# DependencyRegistry
- name: Restore DependencyRegistry
run: dotnet restore ./src/*/*/DependencyRegistry.csproj
- name: Build DependencyRegistry
run: dotnet build ./src/*/*/DependencyRegistry.csproj --no-restore -c Release
- name: Pack DependencyRegistry
run: dotnet pack ./src/*/*/DependencyRegistry.csproj --no-restore -o ~/nuget -c Release
- name: Restore DependencyRegistry.Tests
run: dotnet restore ./src/*/*/DependencyRegistry.Tests.csproj
- name: Test DependencyRegistry.Tests
run: dotnet test ./src/*/*/DependencyRegistry.Tests.csproj --no-restore -c Release
# Push
- name: Push Packages
if: ${{ github.event_name == 'release' }}
run: >
dotnet nuget push "../../../nuget/*.nupkg"
-s https://api.nuget.org/v3/index.json
-k ${{ secrets.NuGetSourcePassword }}
--skip-duplicate