-
Notifications
You must be signed in to change notification settings - Fork 3
184 lines (145 loc) · 7.57 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
name: compile & test & publish
on:
push:
branches:
[ master ]
pull_request:
branches: [ master ] # Default release branch
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
jobs:
publish:
name: build, pack & publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK 6.0.*/7.0/net461
uses: actions/setup-dotnet@v2.0.0
with:
dotnet-version: |
6.0.*
7.0.*
2.1
3.1.*
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: EmitMapper Unit Tests
run: dotnet test EmitMapper.Tests/EmitMapper.Tests.csproj --no-build --verbosity normal -p:ParallelizeTestCollections=false
- name: Sample Unit Tests
run: dotnet test Samples/SamplesTests/SamplesTests.csproj --no-build --verbosity normal -p:ParallelizeTestCollections=false
#- uses: hmarr/debug-action@v2
# Publish
- name: publish emitmapper on version change
id: publish_nuget_emitmapper
#uses: rohith/publish-nuget@v2
uses: niubilitytools/push-nuget@v1
with:
# Filepath of the project to be packaged, relative to root of repository
project_file_path: src/EmitMapper/EmitMapper.csproj
# NuGet package id, used for version detection & defaults to project name
package_name: Niubility.EmitMapper
# Filepath with version info, relative to root of repository & defaults to project_file_path
version_file_path: Directory.Config.props
# Regex pattern to extract version info in a capturing group
# version_regex: ^\s*<Version>(.*)<\/Version>\s*$
# Useful with external providers like Nerdbank.GitVersioning, ignores version_file_path & version_regex
# version_static: 1.0.0
# Flag to toggle git tagging, enabled by default
# tag_commit: true
# Format of the git tag, [*] gets replaced with actual version
# tag_format: v*
# API key to authenticate with NuGet server
nuget_key: ${{ secrets.NUGET_API_KEY }}
# NuGet server uri hosting the packages, https://nuget.pkg.github.com or https://api.nuget.org. defaults to https://api.nuget.org
nuget_source: https://api.nuget.org
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
include_symbols: true
# Flag to set continue the next task when some error happened
error_continue: true
- name: publish LightDataAccess on version change
id: publish_nuget_LightDataAccess
#uses: rohith/publish-nuget@v2
uses: niubilitytools/push-nuget@v1
with:
# Filepath of the project to be packaged, relative to root of repository
project_file_path: Samples/LightDataAccess/LightDataAccess.csproj
# NuGet package id, used for version detection & defaults to project name
package_name: Niubility.LightDataAccess
# Filepath with version info, relative to root of repository & defaults to project_file_path
version_file_path: Directory.Config.props
# Regex pattern to extract version info in a capturing group
# version_regex: ^\s*<Version>(.*)<\/Version>\s*$
# Useful with external providers like Nerdbank.GitVersioning, ignores version_file_path & version_regex
# version_static: 1.0.0
# Flag to toggle git tagging, enabled by default
tag_commit: false
# Format of the git tag, [*] gets replaced with actual version
# tag_format: v*
# API key to authenticate with NuGet server
nuget_key: ${{ secrets.NUGET_API_KEY }}
# NuGet server uri hosting the packages, https://nuget.pkg.github.com or https://api.nuget.org. defaults to https://api.nuget.org
nuget_source: https://api.nuget.org
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
include_symbols: true
# Flag to set continue the next task when some error happened
error_continue: true
- name: publish EMConfigurations on version change
id: publish_nuget_EMConfigurations
#uses: rohith/publish-nuget@v2
uses: niubilitytools/push-nuget@v1
with:
# Filepath of the project to be packaged, relative to root of repository
project_file_path: Samples/EMConfigurations/EMConfigurations.csproj
# NuGet package id, used for version detection & defaults to project name
package_name: Niubility.EMConfigurations
# Filepath with version info, relative to root of repository & defaults to project_file_path
version_file_path: Directory.Config.props
# Regex pattern to extract version info in a capturing group
# version_regex: ^\s*<Version>(.*)<\/Version>\s*$
# Useful with external providers like Nerdbank.GitVersioning, ignores version_file_path & version_regex
# version_static: 1.0.0
# Flag to toggle git tagging, enabled by default
tag_commit: false
# Format of the git tag, [*] gets replaced with actual version
# tag_format: v*
# API key to authenticate with NuGet server ${{secrets.NUGET_API_KEY}}
nuget_key: ${{ secrets.NUGET_API_KEY }}
# NuGet server uri hosting the packages, https://nuget.pkg.github.com or https://api.nuget.org. defaults to https://api.nuget.org
nuget_source: https://api.nuget.org
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
include_symbols: true
# Flag to set continue the next task when some error happened
error_continue: true
- name: publish EmitMapper.Mvc.Net on version change
id: publish_nuget_EmitMapper_Mvc_Net
#uses: rohith/publish-nuget@v2
uses: niubilitytools/push-nuget@v1
with:
# Filepath of the project to be packaged, relative to root of repository
project_file_path: Samples/EmitMapper.Mvc.Net/EmitMapper.Mvc.Net.csproj
# NuGet package id, used for version detection & defaults to project name
package_name: Niubility.EmitMapper.Mvc.Net
# Filepath with version info, relative to root of repository & defaults to project_file_path
version_file_path: Directory.Config.props
# Regex pattern to extract version info in a capturing group
# version_regex: ^\s*<Version>(.*)<\/Version>\s*$
# Useful with external providers like Nerdbank.GitVersioning, ignores version_file_path & version_regex
# version_static: 1.0.0
# Flag to toggle git tagging, enabled by default
tag_commit: false
# Format of the git tag, [*] gets replaced with actual version
# tag_format: v*
# API key to authenticate with NuGet server
nuget_key: ${{ secrets.NUGET_API_KEY }}
# NuGet server uri hosting the packages, https://nuget.pkg.github.com or https://api.nuget.org. defaults to https://api.nuget.org
nuget_source: https://api.nuget.org
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
include_symbols: true
# Flag to set continue the next task when some error happened
# error_continue: false