-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathappveyor.yml
81 lines (75 loc) · 3.12 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
version: 4.1.{build}
skip_tags: true
image:
- Visual Studio 2019 Preview
configuration:
- Release
pull_requests:
do_not_increment_build_number: true
skip_branch_with_pr: true
environment:
LOGGER: '/l:"C:\Program Files\AppVeyor\BuildAgent\dotnetcore\Appveyor.MSBuildLogger.dll"'
LIBRARY: './Project2015To2017/Project2015To2017.csproj'
CLITOOL2017: './Project2015To2017.Migrate2017.Tool/Project2015To2017.Migrate2017.Tool.csproj'
CLITOOL2019: './Project2015To2017.Migrate2019.Tool/Project2015To2017.Migrate2019.Tool.csproj'
build_script:
- cmd: dotnet --version
- cmd: dotnet pack %LIBRARY% %LOGGER% -v m -c %configuration% --force /p:Pack=true
- cmd: dotnet pack %CLITOOL2017% %LOGGER% -v m -c %configuration% --force /p:Pack=true
- cmd: dotnet publish %CLITOOL2017% %LOGGER% -v m -c %configuration% -f net6.0 -o ./out2017/net6.0
- cmd: dotnet publish %CLITOOL2017% %LOGGER% -v m -c %configuration% -f net461 -o ./out2017/net461
- cmd: dotnet pack %CLITOOL2019% %LOGGER% -v m -c %configuration% --force /p:Pack=true
- cmd: dotnet publish %CLITOOL2019% %LOGGER% -v m -c %configuration% -f net6.0 -o ./out2019/net6.0
- cmd: dotnet publish %CLITOOL2019% %LOGGER% -v m -c %configuration% -f net461 -o ./out2019/net461
after_build:
- cmd: 7z a ./dotnet-migrate-2017.zip ./out2017/*
- cmd: 7z a ./dotnet-migrate-2019.zip ./out2019/*
test_script:
- cmd: dotnet test Project2015To2017.Tests/Project2015To2017.Tests.csproj -c %configuration% --test-adapter-path:. --logger:Appveyor
artifacts:
- path: ./Project2015To2017.Migrate2017.Tool/bin/$(configuration)/Project2015To2017.Migrate2017.Tool.**.nupkg
name: global-tool-2017
- path: ./Project2015To2017.Migrate2019.Tool/bin/$(configuration)/Project2015To2017.Migrate2019.Tool.**.nupkg
name: global-tool-2019
- path: ./dotnet-migrate-2017.zip
name: out-zip-2017
- path: ./dotnet-migrate-2019.zip
name: out-zip-2019
- path: Project2015To2017\bin\$(configuration)\Project2015To2017.**.nupkg
name: nupkg
deploy:
- provider: NuGet
api_key:
secure: XgL0jfFteFgz1h0IZ/2HlUueX/x29Yyx+fRBY+nkPENYoolCc/SjIF7Ai3lYKEh7
skip_symbols: false
artifact: nupkg
on:
branch: master
- provider: NuGet
api_key:
secure: mGP4HK+SzuyIu7lzoy/P9iPamOvL10jY2jYdcQ4vkpAQs1wO402XdPKbQ2GbOB2f
skip_symbols: false
artifact: global-tool-2017
on:
branch: master
- provider: NuGet
api_key:
secure: YhK8qVPhexeUqLwwy1u71KJHCP+Nk/Gs8ZMpTLQDIRNNuf83D4so32oZfYKnrN7J
skip_symbols: false
artifact: global-tool-2019
on:
branch: master
- provider: GitHub
release: dotnet-migrate-v$(APPVEYOR_BUILD_VERSION)
description: 'Automatically built release v$(APPVEYOR_BUILD_VERSION).'
auth_token:
secure: "aw2QlhQ+yq+i7WPenHdqPBfcGtIMz177Yzf7S27+Zs/95CxsWhjqbHJ+54jKKnXiLBQ6mBt8JYI7sreOHZdyAbRrJX2kTNOfFc5mYP0TUBk4V3xOqdJ/qU5YuAZrlLWg"
artifact: out-zip-2017,out-zip-2019
draft: true
prerelease: true
on:
branch: master
# build cache to preserve files/folders between builds
cache:
- packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
- '%LocalAppData%\NuGet\Cache'