-
Notifications
You must be signed in to change notification settings - Fork 12
/
appveyor.yml
79 lines (64 loc) · 2.5 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
version: 2.0.0.{build}
configuration: Release
platform: Any CPU
skip_tags: true
init:
- git config --global core.autocrlf true
install:
- ps: |
aws s3 cp --region us-west-2 s3://codepipeline-docker-runner-us-west-2/credentials/github-packages/GitHubReadWrite.json ./GitHubReadWrite.json
aws s3 cp --region us-west-2 s3://codepipeline-docker-runner-us-west-2/credentials/github-packages/GitHubReadOnly.json ./GitHubReadOnly.json
$GHP_RW_CONTENT = Get-Content -PATH GitHubReadWrite.json | ConvertFrom-Json
$env:unencrypted_readwrite_ghp_token = $GHP_RW_CONTENT.replicon
$GHP_RO_CONTENT = Get-Content -PATH GitHubReadOnly.json | ConvertFrom-Json
$env:unencrypted_readonly_ghp_token = $GHP_RO_CONTENT.replicon
Remove-Item -Path .\GitHubReadWrite.json
nuget sources Add -NonInteractive -Name replicon -Username repl-ci-bot -Password $env:unencrypted_readonly_ghp_token -StorePasswordInClearText -Source "https://nuget.pkg.github.com/replicon/index.json"
$env:component_version = $env:APPVEYOR_BUILD_VERSION
If ($env:APPVEYOR_REPO_BRANCH -ne "master") {
$nuget_suffix = $env:APPVEYOR_REPO_BRANCH.substring(0, [System.Math]::Min(20, $env:APPVEYOR_REPO_BRANCH.length)) -replace "[^a-zA-Z0-9\-]","-"
$env:component_version = $env:component_version + "-" + $nuget_suffix
}
Write-Host "Nuget Component Version:" $env:component_version
assembly_info:
patch: true
file: AssemblyInfo.*
assembly_version: "{version}"
assembly_file_version: "{version}"
assembly_informational_version: "$(component_version)"
environment:
matrix:
- job_name: Linux
appveyor_build_worker_image: Ubuntu
- job_name: Windows
appveyor_build_worker_image: Visual Studio 2022
job_depends_on: Linux
matrix:
fast_finish: true
build:
publish_nuget: true
build_script:
- ps: dotnet build -f net6.0
test_script:
- ps: dotnet test -f net6.0 --no-build
for:
-
matrix:
only:
- job_name: Windows
build_script:
- ps: dotnet build
after_build:
- ps: dotnet pack -p:PackageVersion=${env:component_version} --no-build
test_script:
- ps: dotnet test --no-build
artifacts:
- path: '**\*.nupkg'
type: NuGetPackage
deploy:
# push package to developer Github packages
- provider: NuGet
server: https://nuget.pkg.github.com/replicon/index.json
api_key: ${unencrypted_readwrite_ghp_token}
skip_symbols: true
artifact: /.*\.nupkg/