-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
106 lines (85 loc) · 2.83 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
environment:
packageVersion: 2.2.0
acolytePackageZip: 'Acolyte.NET.$(packageVersion).zip'
dotnetFormatVersion: 5.0.211103
version: '$(packageVersion).{build}'
image: Visual Studio 2019
# Do not build on tags (GitHub, Bitbucket, GitLab, Gitea).
skip_tags: true
shallow_clone: true
dotnet_csproj:
patch: true
file: '**\*.csproj;**\*.fsproj'
assembly_version: '$(packageVersion)'
file_version: '$(packageVersion)'
version: '$(packageVersion)'
# All branches are built by default.
# Build platform is used from solution settings.
configuration:
- Debug
- Release
matrix:
fast_finish: true
install:
- ps: dotnet tool update -g dotnet-format --version $env:dotnetFormatVersion
before_build:
- ps: dotnet restore Acolyte.NET
# Build only package solution. Samples solution will not be built by CI now.
build:
project: Acolyte.NET
verbosity: minimal
after_build:
- ps: >-
if (($env:configuration -eq "Release") -and ($env:APPVEYOR_REPO_BRANCH -eq "master"))
{
dotnet pack --configuration Release --no-build "Acolyte.NET"
7z a -tzip "$env:APPVEYOR_BUILD_FOLDER/$env:acolytePackageZip" "$env:APPVEYOR_BUILD_FOLDER/Acolyte.NET/Libraries/Acolyte.CSharp/bin/Release/*.nupkg" "$env:APPVEYOR_BUILD_FOLDER/Acolyte.NET/Libraries/Acolyte.FSharp/bin/Release/*.nupkg" "$env:APPVEYOR_BUILD_FOLDER/Acolyte.NET/Libraries/Acolyte.NET/bin/Release/*.nupkg"
}
test:
assemblies:
- '**\*.Tests.dll'
after_test:
# F# tests does not execute at all.
- ps: dotnet test --configuration $env:configuration --no-build "Acolyte.NET/Tests/Acolyte.FSharp.Tests/Acolyte.FSharp.Tests.fsproj"
# Check code style.
- ps: dotnet format "Acolyte.NET/Acolyte.NET.sln" --fix-whitespace --fix-style warn --check --verbosity diagnostic
# Upload all NuGet packages to release assets.
artifacts:
- path: '**\*.nupkg'
name: AcolyteNuget
- path: '$(acolytePackageZip)'
name: AcolyteZip
type: zip
# 1. Regenerate AppVeyor Api Key
# https://www.nuget.org/account/apikeys
# 2. Encrypt configuration data
# https://ci.appveyor.com/tools/encrypt
# 3. Paste below
# Deploy from master branch only.
deploy:
# Deploy to NuGet repository.
- provider: NuGet
api_key:
secure: hnKm9eh2iZree0QLhfMG6dkeBzGsJ3UNZpHbddhSB99FuaZxlh8Z+FxHX3c/l3Re
skip_symbols: false
artifact: AcolyteNuget
on:
branch: master
configuration: Release
# Deploy to GitHub Releases.
- provider: GitHub
auth_token:
secure: SRovcwbup+wbPOXvFNL68i764XKufUP6FooF+mRrShiTDLLJZaVkO14y2J0RpSFu
tag: 'v$(packageVersion)'
release: 'Acolyte.NET v$(packageVersion)'
description: 'TODO: write a description.'
draft: false
prerelease: false
artifact: AcolyteZip
on:
branch: master
configuration: Release
pull_requests:
do_not_increment_build_number: true
nuget:
disable_publish_on_pr: true