-
Notifications
You must be signed in to change notification settings - Fork 46
97 lines (75 loc) · 2.37 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
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
name: Full Continuous Integration
on: [push, pull_request]
jobs:
pack:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
steps:
- name: Get source
uses: actions/checkout@v3
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test -c Release --no-build -v normal
shell: bash # defaults disagree on how to quote the filter string
- name: Pack
run: dotnet pack -c Release --no-build -o artifacts -p:NoWarn=NU5105
- name: Upload
uses: actions/upload-artifact@v3
with:
name: NuGet Package Files (${{ matrix.os }})
path: artifacts
deployToMyGet:
name: Deploy to MyGet
runs-on: ubuntu-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
needs: pack
if: github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master')
steps:
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Download Package Files
uses: actions/download-artifact@v3
with:
name: NuGet Package Files (ubuntu-latest)
path: artifacts
- name: Publish Package Files to MyGet
run: dotnet nuget push artifacts/*.nupkg -s https://www.myget.org/F/nettopologysuite/api/v3/index.json -k $MYGET_API_KEY
shell: bash
env:
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
deployToNuGet:
name: Deploy to NuGet
runs-on: ubuntu-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
needs: pack
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Setup .NET Core 6.0
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Download Package Files
uses: actions/download-artifact@v3
with:
name: NuGet Package Files (ubuntu-latest)
path: artifacts
- name: Publish Package Files to NuGet
run: dotnet nuget push artifacts/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY
shell: bash
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}