forked from nanoframework/CoreLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
163 lines (133 loc) · 5.95 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
# configuration these branches
branches:
only:
- master
- /dev.*/
- /release.*/
image: Visual Studio 2017
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
environment:
APPVEYOR_SAVE_CACHE_ON_ERROR: true
matrix:
- RUBY_VERSION: 24
GitHubUserName:
secure: 7OBtVAMTodMWK20wg6pGnQ==
GitHubUserEmail:
secure: /NpmL1KqwHyHFnF0GlUovA586wDIt8Hg/Q8Dro6kUpk=
GitHubToken:
secure: i/2hGsqVMwzdM5yIS4rxOIeG3ftx7su7klWYN80s/fHvgk7A5H2fF3oUTNLcyTbw
GitRestAuth:
secure: E3bCMe4LtDdAhHSYRcLp0N6DixJe1m8TNxhYeJW/GnqM3WXdRqsgkHSbwootPjJQtOQJrps4twmzTVzofLSVgPgbzU8PxU0AkJV7zwkyVOE=
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
- choco install gitversion.portable -pre -y
- ps: .\install-vsix-appveyor.ps1
before_build:
- ps: >-
nuget restore source\nanoFramework.CoreLibrary.sln
C:\ProgramData\chocolatey\lib\GitVersion.Portable\tools\GitVersion.exe /l console /output buildserver /updateAssemblyInfo "source\nanoFramework.CoreLibrary\System\AssemblyInfo2.cs"
build_script:
- ps: >-
msbuild source\nanoFramework.CoreLibrary.sln /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
artifacts:
- path: '**\bin\Release\*.nupkg'
name: Nuget_Packages
before_deploy:
- ps: >-
.\commit-assemblyinfo-changes.ps1
.\generate-change-log.ps1
# requires APPVEYOR_DISCORD_WEBHOOK_URL enviroment variable set with Discord webhook URL
on_failure:
- ps: '& "$env:APPVEYOR_BUILD_FOLDER\appveyor-discord.ps1 failure $env:APPVEYOR_DISCORD_WEBHOOK_URL"'
on_success:
- dotnet tool install --global NuKeeper
- ps: .\update-dependencies.ps1
cache:
- source\packages -> **source\packages.config
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
################################################
# override configuration for specific branches
for:
-
branches:
only:
- master
deploy:
- provider: NuGet
api_key:
secure: NSRDXbS8tmzOy4wStGuO3yQMKI8Sk10vF8iQtz9ZDXEnHfwnuDdnXbr/Kno3MMvY
skip_symbols: true
on:
appveyor_repo_tag: true
- provider: GitHub
tag: v$(GitVersion_NuGetVersionV2)
release: nanoFramework Core Library v$(gitversion_semver)
description: 'Check the [changelog](https://github.com/nanoframework/lib-CoreLibrary/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.CoreLibrary/$(GitVersion_NuGetVersionV2)) v$(GitVersion_NuGetVersionV2)'
auth_token:
secure: DNixoFFE+pGlwyhj7McfZoln42vOmj0iY1iNV9zXEr3y0NpXlOIgL8k5ehzlFM1S
artifact: Nuget_Packages
draft: true
prerelease: true
force_update: true
-
branches:
only:
- /dev.*/
skip_branch_with_pr: true
deploy:
- provider: GitHub
tag: v$(GitVersion_NuGetVersionV2)
release: nanoFramework Core Library v$(gitversion_semver)
description: 'Check the [changelog](https://github.com/nanoframework/lib-CoreLibrary/blob/develop/CHANGELOG.md)\n\n## Install from nanoFramework MyGet development feed\n\nThe following NuGet packages are available for download from this release\n\npackage: [.NET](https://www.myget.org/feed/nanoframework-dev/package/nuget/nanoFramework.CoreLibrary/$(GitVersion_NuGetVersionV2)) v$(GitVersion_NuGetVersionV2)'
auth_token:
secure: DNixoFFE+pGlwyhj7McfZoln42vOmj0iY1iNV9zXEr3y0NpXlOIgL8k5ehzlFM1S
artifact: Nuget_Packages
draft: true
prerelease: true
force_update: true
after_deploy:
# for this environment variable to work here it has to be set in AppVeyor UI
- nuget push source\Nuget.CoreLibrary\bin\Release\nanoFramework.CoreLibrary.%GitVersion_NuGetVersionV2%.nupkg %MyGetToken% -Source https://www.myget.org/F/nanoframework-dev/api/v2/package
- nuget push source\Nuget.CoreLibrary.DELIVERABLES\bin\Release\nanoFramework.CoreLibrary.DELIVERABLES.%GitVersion_NuGetVersionV2%.nupkg %MyGetToken% -Source https://www.myget.org/F/nanoframework-dev/api/v2/package
-
branches:
only:
- /release.*/
deploy:
- provider: GitHub
tag: v$(GitVersion_NuGetVersionV2)
release: nanoFramework Core Library v$(gitversion_semver)
description: 'Check the [changelog](https://github.com/nanoframework/lib-CoreLibrary/blob/$(appveyor_repo_branch)/CHANGELOG.md)\n\n## Install from nanoFramework MyGet development feed\n\nThe following NuGet packages are available for download from this release\n\n:package: [.NET](https://www.myget.org/feed/nanoframework-dev/package/nuget/nanoFramework.CoreLibrary/$(GitVersion_NuGetVersionV2)) v$(GitVersion_NuGetVersionV2)'
auth_token:
secure: DNixoFFE+pGlwyhj7McfZoln42vOmj0iY1iNV9zXEr3y0NpXlOIgL8k5ehzlFM1S
artifact: Nuget_Packages
draft: true
prerelease: true
force_update: true
after_deploy:
# for this environment variable to work here it has to be set in AppVeyor UI
- nuget push source\Nuget.CoreLibrary\bin\Release\nanoFramework.CoreLibrary.%GitVersion_NuGetVersionV2%.nupkg %MyGetToken% -Source https://www.myget.org/F/nanoframework-dev/api/v2/package
- nuget push source\Nuget.CoreLibrary.DELIVERABLES\bin\Release\nanoFramework.CoreLibrary.DELIVERABLES.%GitVersion_NuGetVersionV2%.nupkg %MyGetToken% -Source https://www.myget.org/F/nanoframework-dev/api/v2/package