forked from studyzy/imewlconverter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
98 lines (90 loc) · 4.13 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
image:
- Visual Studio 2022
- Ubuntu
# fix issue https://github.com/nunit/nunit-console/issues/1101, .NET 6.0 support in 3.15.0 or later.
# the script from: https://help.appveyor.com/discussions/questions/47366-nunit-console-runner-version
#init:
version: "{branch}.{build}"
for:
-
matrix:
only:
- image: Ubuntu
clone_folder: ~/imewlconverter
build_script:
- dotnet build ./src/ImeWlConverterCmd --configuration Release
after_build:
- cd ./src/ImeWlConverterCmd/bin/Release/net6.0
- tar czvf ./imewlconverter_Linux_Mac.tar.gz *
- mv ./imewlconverter_Linux_Mac.tar.gz ~/imewlconverter
- cd ~/imewlconverter
# - dotnet ./ImeWlConverterCmd.dll -?
test_script:
- cd ./src/ImeWlConverterCoreTest
- dotnet add ImeWlConverterCoreTest.csproj package Appveyor.TestLogger --version 2.0.0
- cd ../..
- dotnet test --test-adapter-path:. --logger:Appveyor ./src/ImeWlConverterCoreTest/ImeWlConverterCoreTest.csproj --configuration Release
artifacts:
- path: imewlconverter_Linux_Mac.tar.gz
name: DotnetCore
deploy:
tag: $(APPVEYOR_REPO_TAG_NAME)
release: imewlconverter-$(APPVEYOR_REPO_TAG_NAME)
description: 'New Release'
provider: GitHub
auth_token:
secure: XLH30sjOKisCZ2+ehPEf+7NVmaKdH8khPqwfT8BOOg6X6TWo48ptjgj21SZPHrYl # your encrypted token from GitHub
artifact: imewlconverter_Linux_Mac.tar.gz # upload all NuGet packages to release assets
draft: false
prerelease: false
force_update: true
on:
branch: master # release from master branch only
APPVEYOR_REPO_TAG: true # deploy on tag push only
-
matrix:
only:
- image: Visual Studio 2022
clone_folder: C:\imewlconverter
before_build:
- ps: |
# nunit
$nunitPath = "$env:SYSTEMDRIVE\Tools\NUnit3"
Remove-Item $nunitPath -Recurse -Force
$zipPath = "$env:TEMP\NUnit.Console-3.15.0.zip"
$tempPath = "$env:TEMP\NUnit.Console"
(New-Object Net.WebClient).DownloadFile('https://github.com/nunit/nunit-console/releases/download/3.15.0/NUnit.Console-3.15.0.zip', $zipPath)
7z x $zipPath -y -o"$tempPath" | Out-Null
[IO.Directory]::Move("$tempPath\bin\net6.0", $nunitPath)
# logger
$zipPath = "$env:TEMP\Appveyor.NUnit3Logger.zip"
(New-Object Net.WebClient).DownloadFile('https://www.appveyor.com/downloads/Appveyor.NUnit3Logger.zip', $zipPath)
7z x $zipPath -y -o"$nunitPath\addins" | Out-Null
Move-Item "$nunitPath\addins\appveyor.addins" "$nunitPath\appveyor.addins"
- SET SLNPATH=%APPVEYOR_BUILD_FOLDER%\src\IME WL Converter WinForm.sln
- SET DIST=%APPVEYOR_BUILD_FOLDER%\src\IME WL Converter Win\bin\Release\net6.0-windows
- MSBuild "%SLNPATH%" -t:restore
- nuget restore "%SLNPATH%"
build_script:
- MSBuild "%SLNPATH%" /t:Rebuild /p:Configuration=Release
- 7z a imewlconverter_Windows.zip "%DIST%\*.exe" "%DIST%\*.dll" "%DIST%\Readme.txt" "%DIST%\*.runtimeconfig.json"
after_build:
test_script:
- C:\Tools\NUnit3\nunit3-console "C:\imewlconverter\src\ImeWlConverterCoreTest\bin\Release\net6.0\ImeWlConverterCoreTest.dll" -result=myresults.xml
artifacts:
- path: imewlconverter_Windows.zip
name: WinForm
deploy:
tag: $(appveyor_repo_tag_name)
release: imewlconverter-$(appveyor_repo_tag_name)
description: 'New Release'
provider: GitHub
auth_token:
secure: XLH30sjOKisCZ2+ehPEf+7NVmaKdH8khPqwfT8BOOg6X6TWo48ptjgj21SZPHrYl # your encrypted token from GitHub
artifact: imewlconverter_Windows.zip # upload all NuGet packages to release assets
draft: false
prerelease: false
force_update: true
on:
branch: master # release from master branch only
APPVEYOR_REPO_TAG: true # deploy on tag push only