forked from nanoframework/Windows.Devices.Gpio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
314 lines (249 loc) · 10.2 KB
/
appveyor.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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# configuration for "master" branch
-
branches:
only:
- master
image: Visual Studio 2017
skip_branch_with_pr: true
# Skipping commits affecting specific files
skip_commits:
files:
- '**\AssemblyInfo.*'
- '**/*.md'
- 'LICENSE'
- dir/*
- '.gitignore'
build:
verbosity: minimal
test: off
environment:
APPVEYOR_SAVE_CACHE_ON_ERROR: true
matrix:
- RUBY_VERSION: 24
GitHubUserName:
secure: 7OBtVAMTodMWK20wg6pGnQ==
GitHubUserEmail:
secure: HeABB68Sn/Lhbd69C2cUcfWv0ab/rMDEcOLvcxf8gGw=
GitHubToken:
secure: WOqlCsnwTzfDPJFoNV/h8mEESIpG/9uFn1u6oE8hGZtXwIQQlsY+NyyLt9Y5xoFn
init:
- git config --global core.autocrlf true
- git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GitHubToken):[email protected]`n"
- git config --global user.email "%GitHubUserEmail%"
- git config --global user.name "%GitHubUserName%"
install:
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
- gem install github_changelog_generator --quiet --no-ri --no-rdoc
# - bundle install
- choco install gitversion.portable -pre -y
- ps: .\install-vsix-appveyor.ps1
before_build:
- ps: >-
nuget sources add -name MyGet -Source https://www.myget.org/F/nanoframework-dev
nuget restore source\nanoFramework.Windows.Devices.Gpio.sln
gitversion /l console /output buildserver /updateAssemblyInfo /ensureassemblyinfo
build_script:
- ps: >-
msbuild source\nanoFramework.Windows.Devices.Gpio.sln /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
msbuild source\nanoFramework.Windows.Devices.Gpio.Nuget.sln /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
before_deploy:
# need this to keep ruby happy
- ps: md c:\tmp
- bundle exec github_changelog_generator --token %GitHubToken%
# add here the updated changelog and the updated assembly info files
- git add .
- git commit --amend --no-edit
artifacts:
- path: '**\bin\Release\*.nupkg'
name: Nuget_Packages
deploy:
- provider: NuGet
api_key:
secure: NSRDXbS8tmzOy4wStGuO3yQMKI8Sk10vF8iQtz9ZDXEnHfwnuDdnXbr/Kno3MMvY
skip_symbols: true
on:
appveyor_repo_tag: true
- provider: GitHub
tag: v$(GitVersion_NuGetVersionV2)
release: nanoFramework Windows.Devices.Gpio Library v$(gitversion_semver)
description: '[CHANGELOG.md](https://github.com/nanoframework/lib-nanoFramework.Windows.Devices.Gpio/blob/master/CHANGELOG.md)\n\n## Install from NuGet\n\nThe following NuGet packages are available for download from this release\n\n:package: [.NET](https://www.nuget.org/packages/nanoFramework.Windows.Devices.Gpio/$(GitVersion_NuGetVersionV2)) v$(GitVersion_NuGetVersionV2)'
auth_token:
secure: DNixoFFE+pGlwyhj7McfZoln42vOmj0iY1iNV9zXEr3y0NpXlOIgL8k5ehzlFM1S
artifact: Nuget_Packages
draft: true
prerelease: true
force_update: true
notifications:
- provider: Slack
auth_token:
secure: 2tqAJTTbN2dm24Vrwo5TXun3Vxc34R5G9l7o3pK3xEuKZAzxx3nbP2yGkMI/kl3+NxHXknjBfZnkhZC5eLYBHb+jO7YVUZwPYOfC/ZGy5HU=
channel: '#build-monitor'
on_build_status_changed: true
on_build_success: false
on_build_failure: false
cache:
- source\packages -> **source\packages.config
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
####################################
# configuration for develop branches
-
branches:
only:
- /dev.*/
image: Visual Studio 2017
skip_branch_with_pr: true
# Do not build on tags
skip_tags: false
test: off
pull_requests:
do_not_increment_build_number: true
# Skipping commits affecting specific files
skip_commits:
files:
- '**\AssemblyInfo.*'
- '**/*.md'
- 'LICENSE'
- dir/*
- '.gitignore'
build:
verbosity: minimal
install:
- choco install gitversion.portable -pre -y
- ps: .\install-vsix-appveyor.ps1
before_build:
- ps: >-
nuget sources add -name MyGet -Source https://www.myget.org/F/nanoframework-dev
nuget restore source\nanoFramework.Windows.Devices.Gpio.sln
gitversion /l console /output buildserver /updateAssemblyInfo /ensureassemblyinfo
build_script:
- ps: >-
msbuild source\nanoFramework.Windows.Devices.Gpio.sln /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
msbuild source\nanoFramework.Windows.Devices.Gpio.Nuget.sln /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
on_success:
# for this environment variable to work here it has to be set in AppVeyor UI
- nuget push source\Nuget.Windows.Devices.Gpio\bin\Release\nanoFramework.Windows.Devices.Gpio.%GitVersion_NuGetVersionV2%.nupkg %MyGetToken% -Source https://www.myget.org/F/nanoframework-dev/api/v2/package
- nuget push source\Nuget.Windows.Devices.Gpio.DELIVERABLES\bin\Release\nanoFramework.Windows.Devices.Gpio.DELIVERABLES.%GitVersion_NuGetVersionV2%.nupkg %MyGetToken% -Source https://www.myget.org/F/nanoframework-dev/api/v2/package
artifacts:
- path: '**\bin\Release\*.nupkg'
name: Nuget_Packages
deploy:
# the provider is actually MyGet but works the same as NuGet
- provider: NuGet
server: https://www.myget.org/F/nanoframework-dev/api/v2/package
api_key:
secure: 0drE56FivPFYI3oVZWcVFTpjOXSqyjT6kGangIxFRcRLqMhV3lQHqUButuuiPM+N
skip_symbols: true
- provider: GitHub
tag: v$(GitVersion_NuGetVersionV2)
release: nanoFramework Windows.Devices.Gpio Library v$(gitversion_semver)
description: '[CHANGELOG.md](https://github.com/nanoframework/lib-Windows.Devices.Gpio/blob/master/CHANGELOG.md)\n\n## Install from NuGet\n\nThe following NuGet packages are available for download from this release\n\n:package: [.NET](https://www.nuget.org/packages/nanoFramework.Windows.Devices.Gpio/$(GitVersion_NuGetVersionV2)) v$(GitVersion_NuGetVersionV2)'
auth_token:
secure: DNixoFFE+pGlwyhj7McfZoln42vOmj0iY1iNV9zXEr3y0NpXlOIgL8k5ehzlFM1S
artifact: Nuget_Packages
draft: true
prerelease: true
force_update: true
notifications:
- provider: Slack
auth_token:
secure: 2tqAJTTbN2dm24Vrwo5TXun3Vxc34R5G9l7o3pK3xEuKZAzxx3nbP2yGkMI/kl3+NxHXknjBfZnkhZC5eLYBHb+jO7YVUZwPYOfC/ZGy5HU=
channel: '#build-monitor'
on_build_status_changed: true
on_build_success: false
on_build_failure: false
cache:
- source\packages -> **source\packages.config
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
############################################
# configuration for release candidate branch
-
branches:
only:
- release.*
image: Visual Studio 2017
skip_branch_with_pr: true
# OK to get only last commit as we don't need history
clone_depth: 1
# Skipping commits affecting specific files
skip_commits:
files:
- '**\AssemblyInfo.*'
- '**/*.md'
- 'LICENSE'
- dir/*
- '.gitignore'
build:
verbosity: minimal
test: off
environment:
matrix:
- RUBY_VERSION: 24
GitHubUserName:
secure: 7OBtVAMTodMWK20wg6pGnQ==
GitHubUserEmail:
secure: HeABB68Sn/Lhbd69C2cUcfWv0ab/rMDEcOLvcxf8gGw=
GitHubToken:
secure: WOqlCsnwTzfDPJFoNV/h8mEESIpG/9uFn1u6oE8hGZtXwIQQlsY+NyyLt9Y5xoFn
init:
- git config --global core.autocrlf true
- git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GitHubToken):[email protected]`n"
- git config --global user.email "%GitHubUserEmail%"
- git config --global user.name "%GitHubUserName%"
install:
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
- bundle config --local path vendor/bundle
- gem install bundler --quiet --no-ri --no-rdoc
- gem install github_changelog_generator --quiet --no-ri --no-rdoc
# - bundle install
- choco install gitversion.portable -pre -y
- ps: .\install-vsix-appveyor.ps1
before_build:
- ps: >-
nuget sources add -name MyGet -Source https://www.myget.org/F/nanoframework-dev
nuget restore source\nanoFramework.Windows.Devices.Gpio.sln
gitversion /l console /output buildserver /updateAssemblyInfo /ensureassemblyinfo
build_script:
- ps: >-
msbuild source\nanoFramework.Windows.Devices.Gpio.sln /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
msbuild source\nanoFramework.Windows.Devices.Gpio.Nuget.sln /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
before_deploy:
# need this to keep ruby happy
- ps: md c:\tmp
- bundle exec github_changelog_generator --token %GitHubToken%
# add here the updated changelog and the updated assembly info files
- git add .
- git commit --amend --no-edit
artifacts:
- path: '**\bin\Release\*.nupkg'
name: Nuget_Packages
deploy:
- provider: NuGet
api_key:
secure: NSRDXbS8tmzOy4wStGuO3yQMKI8Sk10vF8iQtz9ZDXEnHfwnuDdnXbr/Kno3MMvY
skip_symbols: true
- provider: GitHub
tag: v$(GitVersion_NuGetVersionV2)
release: nanoFramework Windows.Devices.Gpio Library v$(gitversion_semver)
description: '[CHANGELOG.md](https://github.com/nanoframework/lib-Windows.Devices.Gpio/blob/master/CHANGELOG.md)\n\n## Install from NuGet\n\nThe following NuGet packages are available for download from this release\n\n:package: [.NET](https://www.nuget.org/packages/nanoFramework.Windows.Devices.Gpio/$(GitVersion_NuGetVersionV2)) v$(GitVersion_NuGetVersionV2)'
auth_token:
secure: DNixoFFE+pGlwyhj7McfZoln42vOmj0iY1iNV9zXEr3y0NpXlOIgL8k5ehzlFM1S
artifact: Nuget_Packages
draft: true
prerelease: true
force_update: true
notifications:
- provider: Slack
auth_token:
secure: 2tqAJTTbN2dm24Vrwo5TXun3Vxc34R5G9l7o3pK3xEuKZAzxx3nbP2yGkMI/kl3+NxHXknjBfZnkhZC5eLYBHb+jO7YVUZwPYOfC/ZGy5HU=
channel: '#build-monitor'
on_build_status_changed: true
on_build_success: false
on_build_failure: false
cache:
- source\packages -> **source\packages.config
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml