OSDN Git Service

AppVeyorでのビルド時にCodecovへのカバレッジの送信を行わない
[opentween/open-tween.git] / appveyor.yml
1 version: 3.9.0.{build}
2
3 os: Visual Studio 2022
4
5 environment:
6   matrix:
7     - RELEASE_TAG: 'false'
8     - RELEASE_TAG: 'true'
9
10 configuration:
11   - Debug
12   - Release
13
14 matrix:
15   exclude:
16     - RELEASE_TAG: 'false'
17       configuration: Release
18     - RELEASE_TAG: 'true'
19       configuration: Debug
20
21 branches:
22   only:
23     - develop
24     - /^OpenTween.+/ # release tag
25
26 for:
27   - # for dev build
28     matrix:
29       only:
30         - RELEASE_TAG: 'false'
31     skip_tags: true
32     assembly_info:
33       patch: true
34       file: OpenTween\Properties\AssemblyInfo.cs
35       assembly_version: '{version}'
36     artifacts:
37       - name: OpenTween.zip
38         path: OpenTween_dev-$(APPVEYOR_BUILD_NUMBER).zip
39   - # for release build
40     matrix:
41       only:
42         - RELEASE_TAG: 'true'
43     skip_non_tags: true
44     artifacts:
45       - name: OpenTween.zip
46         path: $(APPVEYOR_REPO_TAG_NAME).zip
47
48 build:
49   project: OpenTween.sln
50   verbosity: minimal
51
52 cache:
53   - '%UserProfile%\.nuget\packages -> OpenTween\OpenTween.csproj, OpenTween.Tests\OpenTween.Tests.csproj'
54
55 init:
56   - git config --global core.autocrlf true
57
58 before_build:
59   - nuget restore
60
61 test:
62   assemblies:
63     only:
64       - OpenTween.Tests.dll
65
66 after_test:
67   - ps: |
68       $env:PATH = $env:PATH + ';C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\Roslyn\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\'
69       $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\net48\'
70       if ($env:RELEASE_TAG -eq 'true') {
71         $destPath = $env:APPVEYOR_REPO_TAG_NAME + '.zip'
72       } else {
73         $destPath = 'OpenTween_dev-' + $env:APPVEYOR_BUILD_NUMBER + '.zip'
74       }
75       if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -ne $null) {
76         $headCommit = $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT
77       } else {
78         $headCommit = 'HEAD'
79       }
80       .\tools\build-zip-archive.ps1 -BinDir $binDir -DestPath $destPath -HeadCommit $headCommit
81
82 # vim: et fenc=utf-8 sts=2 sw=2 ts=2