-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
109 lines (93 loc) · 3.32 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
# C/C++ with GCC
# Build your C/C++ project with GCC using make.
# Add steps that publish test results, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc
trigger:
branches:
include:
- refs/heads/*
- refs/tags/*
strategy:
matrix:
linux:
imageName: 'ubuntu-18.04'
windows:
imageName: 'windows-2019'
pool:
vmImage: $(imageName)
steps:
- task: UseDotNet@2
displayName: 'Install .NET Core SDK'
condition: eq( variables['Agent.OS'], 'Linux' )
inputs:
version: '3.1.x'
performMultiLevelLookup: true
- task: UseDotNet@2
condition: eq( variables['Agent.OS'], 'Linux' )
inputs:
version: '3.1.x'
packageType: runtime
- bash: |
pushd agsget
dotnet build --runtime linux-x64 --configuration Debug
dotnet build --runtime osx-x64 --configuration Debug
dotnet build --runtime win-x64 --configuration Debug
dotnet build --runtime win-x86 --configuration Debug
dotnet build --runtime linux-x64 --configuration Release
dotnet build --runtime osx-x64 --configuration Release
dotnet build --runtime win-x64 --configuration Release
dotnet build --runtime win-x86 --configuration Release
dotnet publish -r win-x86 --configuration Release
dotnet publish -r win-x64 --configuration Release
dotnet publish -r linux-x64 --configuration Release
dotnet publish -r osx-x64 --configuration Release
popd
condition: eq( variables['Agent.OS'], 'Linux' )
displayName: 'build'
- bash: |
pushd agsget/agsget/bin/Release/netcoreapp3.1
cp osx-x64/publish/agsget $(Build.ArtifactStagingDirectory)/agsget-osx64
cp linux-x64/publish/agsget $(Build.ArtifactStagingDirectory)/agsget
cp win-x64/publish/agsget.exe $(Build.ArtifactStagingDirectory)/agsget.exe
cp win-x86/publish/agsget.exe $(Build.ArtifactStagingDirectory)/agsget-x86.exe
popd
condition: eq( variables['Agent.OS'], 'Linux' )
displayName: 'collect builds'
- task: CmdLine@2
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: 'Install AGS on Windows'
inputs:
script: choco install -y ags --version=3.5.0.23
- task: NuGetCommand@2
condition: eq( variables['Agent.OS'], 'Windows_NT' )
inputs:
command: 'restore'
restoreSolution: 'agsget/agsget/EditorPlugin/AGS.Plugin.AgsGet.sln'
- task: VSBuild@1
condition: eq( variables['Agent.OS'], 'Windows_NT' )
inputs:
solution: 'agsget/agsget/EditorPlugin/AGS.Plugin.AgsGet.sln'
platform: x86
configuration: Release
- task: CopyFiles@2
condition: eq( variables['Agent.OS'], 'Windows_NT' )
inputs:
sourceFolder: '$(Build.SourcesDirectory)/agsget/agsget/EditorPlugin/AGS.Plugin.AgsGet/bin/x86/Release/net45/'
contents: 'AGS.Plugin.AgsGet.dll'
targetFolder: $(Build.ArtifactStagingDirectory)
- bash: |
echo "##vso[task.setvariable variable=tagname]$(git describe --tags $(git rev-list --tags --max-count=1))"
displayName: 'set tag for upload'
# Upload to Github Release
- task: GithubRelease@0
displayName: 'Create GitHub Release'
inputs:
tagSource: 'auto'
tag: $(tagname)
assetUploadMode: 'replace'
action: 'edit'
gitHubConnection: agsget
repositoryName: ericoporto/agsModuleList
assets: |
$(Build.ArtifactStagingDirectory)/agsge*
$(Build.ArtifactStagingDirectory)/AGS.Plugin.AgsGet.*