-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathappveyor.yml
49 lines (38 loc) · 1.58 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
#Publish to PowerShell Gallery with this key (AutomatedLab account)
environment:
NuGetApiKey:
secure: tAdUQmRiZ270LOPN8SwbjISLfu6ldDTw6LWvdtsk+pQR7r5bJnGrG8Ntyt87edJ/
version: 2.3.{build}
skip_tags: true
skip_branch_with_pr: true
image: Visual Studio 2022
# Skip on updates to the readme.
# We can force this by adding [skip ci] or [ci skip] anywhere in commit message
skip_commits:
message: /updated readme.*|update readme.*s/
build:
project: ALCommon.sln
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
before_build:
- nuget restore
- ps: |
Write-Host "'before_build' block"
Write-Host "Setting version number in files"
Add-AppveyorMessage -Message "Setting version number in files" -Category Information
gci -Filter *.psd1 -Recurse | foreach {(Get-Content $_.FullName -Raw) -replace "ModuleVersion += '\d\.\d\.\d'", "ModuleVersion = '$env:APPVEYOR_BUILD_VERSION'" | Out-File $_.FullName}
after_build:
- ps: |
Write-Host "Publishing library"
$projPath = Join-Path $env:APPVEYOR_BUILD_FOLDER -ChildPath 'Library\Library.csproj' -Resolve -ErrorAction Stop
dotnet publish $projPath -f net6.0 -o (Join-Path -Path $env:APPVEYOR_BUILD_FOLDER 'BuildOutput\AutomatedLab.Common\lib\core')
dotnet publish $projPath -f net462 -o (Join-Path -Path $env:APPVEYOR_BUILD_FOLDER 'BuildOutput\AutomatedLab.Common\lib\full')
#Kick off the CI/CD pipeline
test_script:
- ps: . .\build.ps1