-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathappveyor.release.yml
More file actions
79 lines (56 loc) · 1.98 KB
/
appveyor.release.yml
File metadata and controls
79 lines (56 loc) · 1.98 KB
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
version: build-{build}
branches:
only:
- master
- develop
skip_non_tags: true
image: Visual Studio 2017
configuration: Release
init:
- ps: >-
$ErrorActionPreference = "Stop"
if ($env:APPVEYOR_REPO_TAG -ne "true")
{
throw "This build should only be triggered using tags in repository."
}
$tag = $env:APPVEYOR_REPO_TAG_NAME
if (-not ($tag -match '^\d+\.\d+\.\d+$'))
{
throw "Tag format is invalid. It should be x.y.z"
}
$isPrerelease = $env:APPVEYOR_REPO_BRANCH -ne "master"
$buildNumber = $env:APPVEYOR_BUILD_NUMBER
$buildVersion = $buildNumber + "-" + $tag
$packageVersion = $tag + $(If ($isPrerelease) {"-pre"} Else {""})
$assemblyVersion = $tag + $(If ($isPrerelease) {".0"} Else {".1"})
Update-AppveyorBuild -Version $buildVersion
$env:CLAY_ONE_PACKAGE_VERSION = $packageVersion
$env:CLAY_ONE_ASSEMBLY_VERSION = $assemblyVersion
$env:CLAY_ONE_IS_PRERELEASE = "$isPrerelease"
[Environment]::SetEnvironmentVariable("CLAY_ONE_PACKAGE_VERSION", $packageVersion, "Machine")
[Environment]::SetEnvironmentVariable("CLAY_ONE_ASSEMBLY_VERSION", $assemblyVersion, "Machine")
[Environment]::SetEnvironmentVariable("CLAY_ONE_IS_PRERELEASE", "$isPrerelease", "Machine")
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: $(CLAY_ONE_PACKAGE_VERSION)
package_version: $(CLAY_ONE_PACKAGE_VERSION)
assembly_version: $(CLAY_ONE_ASSEMBLY_VERSION)
file_version: $(CLAY_ONE_ASSEMBLY_VERSION)
informational_version: $(CLAY_ONE_ASSEMBLY_VERSION)
before_build:
- cmd: nuget restore src\hydrogen.sln
build:
publish_nuget: true
publish_nuget_symbols: true
verbosity: minimal
deploy:
- provider: NuGet
api_key:
secure: py0jt/rSo2JJ4YWxEb6tvsPq/ld0bPfXUSycAMIP1FnhgWYFxd36p503ROjaz0lS
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
description: Release $(APPVEYOR_REPO_TAG_NAME)
auth_token:
secure: PR2N4DNpyemBn+f32B5SXr4e2w19JxwiRq6P9RzHQZ7bsR5UH76/ewi9fYfDloCS
force_update: true