-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
95 lines (68 loc) · 2.64 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
version: 1.0.0.{build}
branches:
except:
- pages
configuration: Release
clone_folder: C:\projects\SparkPost
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
environment:
nuget_user: user@bricksandmortarstudio.com
nuget_password: aHlingenDPOt
install:
- ps: >-
If ($env:APPVEYOR_REPO_BRANCH -eq "master" -Or $env:APPVEYOR_REPO_TAG -eq "true"){
nuget sources add -Name "Rock Master" -Source https://ci.appveyor.com/nuget/bricks-Rock-master;
}
Else{
nuget sources add -Name "Rock Develop" -Source https://ci.appveyor.com/nuget/bricks-rock-develop
}
before_build:
- cmd: nuget restore C:\projects\SparkPost\SparkPost.sln
build:
verbosity: minimal
after_build:
- ps: >-
#The path for the staging directory
$path = $env:APPVEYOR_BUILD_FOLDER+'\out'
#Regex for stripping directory leads for Rock .lst files
$regex = '^(\.*\\*\.)*'
New-Item $path -type directory
New-Item $path\content -type directory
New-Item $path\uninstall -type directory
New-Item $path\content\bin -type directory
New-Item $path\content\Webhooks -type directory
Copy-Item $env:APPVEYOR_BUILD_FOLDER\SparkPost\bin\Release\com.bricksandmortarstudio.SparkPost.dll $path\content\bin\
Copy-Item $env:APPVEYOR_BUILD_FOLDER\SparkPost\Webhooks\SparkPost.ashx $path\content\Webhooks
Get-ChildItem $path\content\*.* -Recurse | Resolve-Path -Relative | Set-Content $path\uninstall\deletefile.lst
(Get-Content $path\uninstall\deletefile.lst) -replace $regex, '' | Set-Content $path\uninstall\deletefile.lst
$name = $env:APPVEYOR_PROJECT_NAME+'-v'+$env:APPVEYOR_BUILD_VERSION+'.plugin'
$command = 'cmd.exe /C 7z a -tzip -r ' + $path + '\' + $name + ' ' + $path + '\*'
Invoke-Expression -Command:$command
Get-ChildItem $path/*.plugin| % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
Push-AppveyorArtifact $env:APPVEYOR_BUILD_FOLDER\SparkPost\bin\Release\com.bricksandmortarstudio.SparkPost.dll -FileName 'com.bricksandmortarstudio.SparkPost.dll'
Push-AppveyorArtifact $env:APPVEYOR_BUILD_FOLDER\SparkPost\Webhooks\SparkPost.ashx -FileName 'SparkPost.ashx'
test: off
deploy:
- provider: GitHub
tag:
release: Version $(appveyor_build_version)
description: Description
auth_token:
secure: purnbQq+/7nii64HdaMRg++QQARjdTJ3VYVIq8EQBR7NxrTp46pw+JIxLjbL/obW
artifact: /.*\.plugin/
draft: true
prerelease: false
force_update: true
on:
branch: master
APPVEYOR_REPO_TAG: true
- provider: Environment
name: Hope
on:
branch: master
APPVEYOR_REPO_TAG: true