-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathazure-pipelines.yml
192 lines (172 loc) · 7.33 KB
/
azure-pipelines.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger: none
pool:
vmImage: windows-latest
steps:
- task: PowerShell@2
displayName: Downloading build dependencies
inputs:
targetType: 'inline'
script: |
# Write your PowerShell commands here.
curl https://defaultstoragewesteur114.blob.core.windows.net/ksp/Dependencies.zip -o Dependencies.zip
- task: ExtractFiles@1
displayName: Extracting dependencies
inputs:
archiveFilePatterns: '**\Dependencies.zip'
destinationFolder: '$(Build.SourcesDirectory)\'
cleanDestinationFolder: false
overwriteExistingFiles: false
- task: NuGetToolInstaller@1
inputs:
versionSpec:
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: 'select'
- task: VSBuild@1
displayName: Compiling mod
inputs:
solution: '$(Build.SourcesDirectory)\OfCourseIStillLoveYou\OfCourseIStillLoveYou.csproj'
msbuildArgs: '-p:PreBuildEvent=;PostBuildEvent= -p:Version=1.0.$(Build.BuildId)'
platform: 'AnyCpu'
configuration: 'Release'
msbuildArchitecture: 'x64'
- task: DeleteFiles@1
inputs:
SourceFolder: '$(Build.SourcesDirectory)\OfCourseIStillLoveYou\Distribution\'
Contents: '**/System.Memory.dll'
#RemoveSourceFolder: # Optional
- task: PowerShell@2
displayName: Creating artifacts folder
inputs:
targetType: 'inline'
script: |
New-Item -ItemType "directory" -Path $(Build.ArtifactStagingDirectory)/win-x64
New-Item -ItemType "directory" -Path $(Build.ArtifactStagingDirectory)/linux-x64
New-Item -ItemType "directory" -Path $(Build.ArtifactStagingDirectory)/osx-x64
- task: CopyFiles@2
displayName: Copy mod binaries to windows artifact directory
inputs:
SourceFolder: '$(Build.SourcesDirectory)\OfCourseIStillLoveYou\Distribution\'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)\win-x64'
- task: CopyFiles@2
displayName: Copy mod binaries to linux artifact directory
inputs:
SourceFolder: '$(Build.SourcesDirectory)\OfCourseIStillLoveYou\Distribution\'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)\linux-x64'
- task: CopyFiles@2
displayName: Copy mod binaries to osx artifact directory
inputs:
SourceFolder: '$(Build.SourcesDirectory)\OfCourseIStillLoveYou\Distribution\'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)\osx-x64'
- task: CopyFiles@2
displayName: Copy grpc native depedency for Windows
inputs:
SourceFolder: '$(Build.SourcesDirectory)\Dependencies\win'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)\win-x64\GameData\OfCourseIStillLoveYou\Plugins'
- task: CopyFiles@2
displayName: Copy grpc native depedency for Linux
inputs:
SourceFolder: '$(Build.SourcesDirectory)\Dependencies\linux'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)\linux-x64\GameData\OfCourseIStillLoveYou\Plugins'
- task: CopyFiles@2
displayName: Copy grpc native depedency for osx
inputs:
SourceFolder: '$(Build.SourcesDirectory)\Dependencies\osx'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)\osx-x64\GameData\OfCourseIStillLoveYou\Plugins'
- task: DotNetCoreCLI@2
displayName: Publishing Desktop win-x64
inputs:
command: 'publish'
zipAfterPublish: false
publishWebProjects: false
projects: '**/OfCourseIStillLoveYou.DesktopClient.csproj'
arguments: '-p:PublishSingleFile=true -p:PublishTrimmed=false --self-contained true -p:Version=1.0.$(Build.BuildId) --configuration Release --runtime win-x64 --output $(Build.ArtifactStagingDirectory)\win-x64'
- task: DotNetCoreCLI@2
displayName: Publishing Server win-x64
inputs:
command: 'publish'
zipAfterPublish: false
publishWebProjects: false
projects: '**/OfCourseIStillLoveYou.Server.csproj'
arguments: '-p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -p:Version=1.0.$(Build.BuildId) --configuration Release --runtime win-x64 --output $(Build.ArtifactStagingDirectory)\win-x64'
- task: DotNetCoreCLI@2
displayName: Publishing Desktop linux-x64
inputs:
command: 'publish'
zipAfterPublish: false
publishWebProjects: false
projects: '**/OfCourseIStillLoveYou.DesktopClient.csproj'
arguments: '-p:PublishSingleFile=true -p:PublishTrimmed=false --self-contained true -p:Version=1.0.$(Build.BuildId) --configuration Release --runtime linux-x64 --output $(Build.ArtifactStagingDirectory)\linux-x64'
- task: DotNetCoreCLI@2
displayName: Publishing Server linux-x64
inputs:
command: 'publish'
zipAfterPublish: false
publishWebProjects: false
projects: '**/OfCourseIStillLoveYou.Server.csproj'
arguments: '-p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -p:Version=1.0.$(Build.BuildId) --configuration Release --runtime linux-x64 --output $(Build.ArtifactStagingDirectory)\linux-x64'
- task: DotNetCoreCLI@2
displayName: Publishing Desktop osx-x64
inputs:
command: 'publish'
zipAfterPublish: false
publishWebProjects: false
projects: '**/OfCourseIStillLoveYou.DesktopClient.csproj'
arguments: '-p:PublishSingleFile=true -p:PublishTrimmed=false --self-contained true -p:Version=1.0.$(Build.BuildId) --configuration Release --runtime osx-x64 --output $(Build.ArtifactStagingDirectory)\osx-x64'
- task: DotNetCoreCLI@2
displayName: Publishing Server osx-x64
inputs:
command: 'publish'
zipAfterPublish: false
publishWebProjects: false
projects: '**/OfCourseIStillLoveYou.Server.csproj'
arguments: '-p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -p:Version=1.0.$(Build.BuildId) --configuration Release --runtime osx-x64 --output $(Build.ArtifactStagingDirectory)\osx-x64'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/win-x64'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '(Build.ArtifactStagingDirectory)/OfCourseIStillLoveYou_win_v1.0.$(Build.BuildId).zip'
replaceExistingArchive: true
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/linux-x64'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '(Build.ArtifactStagingDirectory)/OfCourseIStillLoveYou_linux_v1.0.$(Build.BuildId).zip'
replaceExistingArchive: true
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/osx-x64'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '(Build.ArtifactStagingDirectory)/OfCourseIStillLoveYou_osx_v1.0.$(Build.BuildId).zip'
replaceExistingArchive: true
- task: GitHubRelease@1
inputs:
gitHubConnection: 'JRV'
repositoryName: 'jrodrigv/OfCourseIStillLoveYou'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: 'v1.0.$(Build.BuildId)'
assets: |
(Build.ArtifactStagingDirectory)/OfCourseIStillLoveYou_win_v1.0.$(Build.BuildId).zip
(Build.ArtifactStagingDirectory)/OfCourseIStillLoveYou_linux_v1.0.$(Build.BuildId).zip
(Build.ArtifactStagingDirectory)/OfCourseIStillLoveYou_osx_v1.0.$(Build.BuildId).zip
title: 'OfCourseIStillLoveYou v1.0.$(Build.BuildId)'
releaseNotesFilePath: '$(Build.SourcesDirectory)\ReleaseNotes.md'
isDraft: true
addChangeLog: false