forked from FoundatioFx/Foundatio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
68 lines (58 loc) · 1.92 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
version: '{build}'
image: ubuntu
clone_depth: 2
services:
- docker
pull_requests:
do_not_increment_build_number: true
environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
init:
- git config --global core.autocrlf input
before_build:
- |
VERSION_PREFIX=$(sed -n 's/.*<VersionPrefix>\([^<]*\)<\/VersionPrefix>.*/\1/p' <<< cat ./build/common.props)
if [ $APPVEYOR_REPO_TAG != "true" ]; then
VERSION_SUFFIX="$APPVEYOR_BUILD_NUMBER-pre"
VERSION="$VERSION_PREFIX.$VERSION_SUFFIX"
echo "Version: $VERSION"
else
VERSION_SUFFIX=$APPVEYOR_BUILD_NUMBER
VERSION="$VERSION_PREFIX.$VERSION_SUFFIX"
echo "Version: $VERSION Tag: $APPVEYOR_REPO_TAG_NAME"
fi
if [ -z $APPVEYOR_PULL_REQUEST_NUMBER ]; then
appveyor UpdateBuild -Version $VERSION
fi
build_script:
- docker build --target testrunner -t foundatio:test --build-arg VERSION_SUFFIX=${VERSION_SUFFIX} .
- docker run -e APPVEYOR_API_URL --net=host -v $(pwd)/artifacts:/app/artifacts foundatio:test
after_build:
- docker build --target pack -t foundatio:pack --build-arg VERSION_SUFFIX=${VERSION_SUFFIX} .
- docker run --rm -v $(pwd)/artifacts:/app/artifacts foundatio:pack
artifacts:
- path: artifacts/*.nupkg
name: NuGet
- path: artifacts/*.trx
name: Test Results
deploy:
- provider: Environment
name: GitHub Packages
on:
APPVEYOR_REPO_TAG: false
- provider: Environment
name: NuGet
on:
APPVEYOR_REPO_TAG: true
- provider: GitHub
auth_token:
secure: 0s81q7bweVLTFSOKxnIhan7el6bIFiN8HJ1kYJzOkeFXX7wgGSq9bs/rV53X9qpf
draft: true
on:
APPVEYOR_REPO_TAG: true
notifications:
- provider: Slack
auth_token:
secure: GniMpFE62HprSyQNQoej/VSBnxn2GNnTrca3BnF8+ikMdqduO4Ts4t297teZF6wDAmGwnOtXusctUla8+WxLFkIztvVCS2Z1RG/DvEDYoc0=
channel: '#notifications'