-
Notifications
You must be signed in to change notification settings - Fork 4
/
appveyor.yml
67 lines (60 loc) · 2.32 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
image: Visual Studio 2017
branches:
only:
- main
- /^v\d+\.\d+\.\d+\.\d+$/
init:
- ps: |
if ($env:APPVEYOR_REPO_TAG -eq "true") {
$Env:KBFRZ71_VERSION = "$($env:APPVEYOR_REPO_TAG_NAME.TrimStart("v"))"
} else {
$Env:KBFRZ71_VERSION = "1.0.3.40"
}
before_build:
- ps: docker build --cache-from sprinccompdocker/msklc:1.4 --tag private/msklc:1.4 --file .\Dockerfile .\context\
build_script:
- ps: .\Make-KLC.ps1 -Name KBFRZ71 -Force
- ps: .\Make-KLC.ps1 -Name KBFRZ71N -Force
- ps: Set-Content -Path ".\src\KBFRZ71.klc" -Encoding Unicode -Value (Get-Content -Path ".\KBFRZ71.klc" -Raw -Encoding UTF8)
- ps: Set-Content -Path ".\src\KBFRZ71N.klc" -Encoding Unicode -Value (Get-Content -Path ".\KBFRZ71N.klc" -Raw -Encoding UTF8)
- ps: |
docker run `
--rm `
--mount "type=bind,source=C:\projects\optimized-azerty-win\src,target=C:\sources" `
--env "KBFRZ71_VERSION=$Env:KBFRZ71_VERSION" `
private/msklc:1.4 > build.log
- ps: |
$content = (Get-Content -Path ".\build.log" -Raw)
Write-Host "`r`n"
if ($content.Contains("Error")) {
Write-Host $content -ForegroundColor Red
throw "Build failed."
}
else {
Write-Host $content -ForegroundColor Green
Remove-Item -Path ".\KBFRZ71.klc"
}
- ps: nuget restore .\src\Setup.sln
- ps: msbuild .\src\Setup.sln /p:Configuration=Release /p:SolutionDir=.\src /p:ProductVersion=$Env:KBFRZ71_VERSION
after_build:
- ps: 7z a artifacts\setup.zip .\src\Setup\bin\x86\Release\net452\*.msi
- ps: 7z a artifacts\setup.zip .\src\Setup\bin\x86\Release\net452\*.exe
- ps: 7z a artifacts\setup.zip .\src\Setup\bin\x86\Release\net452\*.config
- ps: copy .\src\Setup\bin\x86\Release\net452\*.msi .\artifacts\
artifacts:
- path: artifacts\setup.zip
name: setup
type: file
- path: 'artifacts\*.msi'
type: file
deploy:
- provider: GitHub
release: $(APPVEYOR_REPO_TAG_NAME)
description: AZERTY NF Z71-300 Keyboard Layout
auth_token:
secure: QxXD5boO1cRwZNpg17XsXqC1kxznj5IhNa1m4TvpuUzl6BSErb99eM0+wMbE5dv8
artifact: /.*\.(msi|zip)$/
prerelease: true
on:
branch: main # only release from main branch
APPVEYOR_REPO_TAG: true # only release on new tag