forked from PixiEditor/PixiEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
windows-x64-release.yml
118 lines (99 loc) · 3.62 KB
/
windows-x64-release.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
# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
trigger:
- release
pr: none
pool:
vmImage: 'windows-latest'
variables:
- group: Release Secrets
- name: solution
value: '**/*.sln'
- name: archNumber
value: '64'
- name: architecture
value: 'x$(archNumber)'
- name: buildPlatform
value: 'win-$(architecture)'
- name: buildConfiguration
value: 'Release'
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '7.0.203'
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: DotNetCoreCLI@2
displayName: "Build PixiEditor Solution"
inputs:
command: 'build'
projects: 'src/PixiEditor'
arguments: '-r "$(buildPlatform)" -c $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: "Build release PixiEditor.UpdateInstaller"
inputs:
command: 'publish'
publishWebProjects: false
projects: '**/PixiEditor.UpdateInstaller.csproj'
arguments: '-o "UpdateInstaller" -r "$(buildPlatform)" --self-contained=false -p:PublishSingleFile=true -c $(buildConfiguration)'
zipAfterPublish: false
- task: PowerShell@2
displayName: "Set tag version"
inputs:
filePath: 'assemblyVerReader.ps1'
- task: PowerShell@2
displayName: Publish PixiEditor
inputs:
filePath: 'src/PixiEditor.Builder/build.ps1'
arguments: '--project-path "$(System.DefaultWorkingDirectory)\src\PixiEditor" --build-configuration "$(buildConfiguration)" --runtime "$(buildPlatform)" -o "$(System.DefaultWorkingDirectory)\Builds\PixiEditor-$(architecture)-light\PixiEditor" --crash-report-webhook-url "$(crash-webhook-url)"'
workingDirectory: 'src/PixiEditor.Builder'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: 'Builds\PixiEditor-$(architecture)-light'
includeRootFolder: false
archiveType: 'zip'
archiveFile: 'PixiEditor.$(TagVersion).$(architecture).zip'
replaceExistingArchive: true
- task: PublishPipelineArtifact@1
displayName: "Publish zip artifact"
inputs:
targetPath: '$(System.DefaultWorkingDirectory)\PixiEditor.$(TagVersion).$(architecture).zip'
artifact: 'PixiEditor.$(TagVersion).$(architecture).zip'
publishLocation: 'pipeline'
- task: CopyFiles@2
displayName: "Copy updater to PixiEditor target dir"
inputs:
SourceFolder: 'UpdateInstaller'
Contents: '**'
TargetFolder: 'Builds/PixiEditor-$(architecture)-light/PixiEditor'
flattenFolders: true
- task: PowerShell@2
displayName: "Compile installer"
inputs:
targetType: 'inline'
script: '& "$env:userprofile\.nuget\packages\tools.innosetup\6.2.1\tools\ISCC.exe" src\Installer\installer-setup-$(architecture)-light.iss'
- task: PublishPipelineArtifact@1
displayName: "Publish artifact"
inputs:
targetPath: 'src/Installer/Assets/PixiEditor-$(architecture)-light/'
artifact: 'PixiEditor-setup-$(architecture).exe'
publishLocation: 'pipeline'
- task: ArchiveFiles@2
displayName: "Create zipped installer"
inputs:
rootFolderOrFile: 'src/Installer/Assets/PixiEditor-$(architecture)-light'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/PixiEditor-$(TagVersion)-setup$(archNumber).zip'
replaceExistingArchive: true
- task: PublishPipelineArtifact@1
displayName: "Publish installer zip artifact"
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/PixiEditor-$(TagVersion)-setup$(archNumber).zip'
artifact: 'PixiEditor-$(TagVersion)-setup$(archNumber).zip'
publishLocation: 'pipeline'