-
-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathstage-layout-msix.yml
More file actions
122 lines (106 loc) · 4.28 KB
/
stage-layout-msix.yml
File metadata and controls
122 lines (106 loc) · 4.28 KB
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
parameters:
BuildToPackage: current
SigningCertificate: ''
jobs:
- job: Make_MSIX_Layout
displayName: Make MSIX layout
workspace:
clean: all
variables:
PYTHONHOME: $(Build.SourcesDirectory)
strategy:
matrix:
#win32:
# Name: win32
# TclLibrary: tcltk_lib_win32
# ExtraOptions: --precompile
amd64:
Name: amd64
Arch: amd64
TclLibrary: tcltk_lib_amd64
ExtraOptions: --precompile
arm64:
Name: arm64
Arch: arm64
HostArch: amd64
TclLibrary: tcltk_lib_arm64
ExtraOptions: --precompile
steps:
- template: ./checkout.yml
- task: DownloadPipelineArtifact@2
displayName: 'Download artifact: bin_$(Name)'
inputs:
${{ if eq(parameters.BuildToPackage, 'current') }}:
buildType: current
${{ else }}:
buildType: specific
buildVersionToDownload: specific
project: $(resources.pipeline.build_to_package.projectId)
pipeline: $(resources.pipeline.build_to_package.pipelineId)
runId: $(resources.pipeline.build_to_package.runID)
artifact: bin_$(Name)
targetPath: $(Pipeline.Workspace)\bin_$(Name)
- task: DownloadPipelineArtifact@2
displayName: 'Download artifact: $(TclLibrary)'
condition: and(succeeded(), variables['TclLibrary'])
inputs:
${{ if eq(parameters.BuildToPackage, 'current') }}:
buildType: current
${{ else }}:
buildType: specific
buildVersionToDownload: specific
project: $(resources.pipeline.build_to_package.projectId)
pipeline: $(resources.pipeline.build_to_package.pipelineId)
runId: $(resources.pipeline.build_to_package.runID)
artifact: $(TclLibrary)
targetPath: $(Pipeline.Workspace)\$(TclLibrary)
- powershell: |
Write-Host "##vso[task.setvariable variable=TCL_LIBRARY]$(Pipeline.Workspace)\$(TclLibrary)\tcl8"
displayName: 'Update TCL_LIBRARY'
condition: and(succeeded(), variables['TclLibrary'])
- ${{ if parameters.SigningCertificate }}:
- task: DownloadPipelineArtifact@2
displayName: 'Download artifact: cert'
inputs:
${{ if eq(parameters.BuildToPackage, 'current') }}:
buildType: current
${{ else }}:
buildType: specific
buildVersionToDownload: specific
project: $(resources.pipeline.build_to_package.projectId)
pipeline: $(resources.pipeline.build_to_package.pipelineId)
runId: $(resources.pipeline.build_to_package.runID)
artifact: cert
targetPath: $(Pipeline.Workspace)\cert
- powershell: |
copy "$(Pipeline.Workspace)\bin_$(Name)\Activate.ps1" Lib\venv\scripts\common\Activate.ps1 -Force -Verbose
displayName: 'Copy signed files into sources'
- template: ./layout-command.yml
parameters:
BuildToPackage: ${{ parameters.BuildToPackage }}
- powershell: |
Remove-Item "$(Build.ArtifactStagingDirectory)\appx-store" -Recurse -Force -EA 0
$(LayoutCmd) --copy "$(Build.ArtifactStagingDirectory)\appx-store" --preset-appx $(ExtraOptions)
displayName: 'Generate store APPX layout'
env:
TCL_LIBRARY: $(TclLibrary)
- ${{ if parameters.SigningCertificate }}:
# The dotnet sign tool shouldn't need this, but we do because of the sccd file
- powershell: |
$info = (gc "$(Pipeline.Workspace)\cert\certinfo.json" | ConvertFrom-JSON)
Write-Host "Side-loadable APPX must be signed with '$($info.Subject)'"
Write-Host "##vso[task.setvariable variable=APPX_DATA_PUBLISHER]$($info.Subject)"
Write-Host "##vso[task.setvariable variable=APPX_DATA_SHA256]$($info.SHA256)"
displayName: 'Override signing parameters'
- powershell: |
Remove-Item "$(Build.ArtifactStagingDirectory)\appx" -Recurse -Force -EA 0
$(LayoutCmd) --copy "$(Build.ArtifactStagingDirectory)\appx" --preset-appx --include-symbols --include-tests $(ExtraOptions)
displayName: 'Generate sideloading APPX layout'
env:
TCL_LIBRARY: $(TclLibrary)
- publish: '$(Build.ArtifactStagingDirectory)\appx-store'
artifact: layout_appxstore_$(Name)
displayName: 'Publish Artifact: layout_appxstore_$(Name)'
- publish: '$(Build.ArtifactStagingDirectory)\appx'
artifact: layout_appx_$(Name)
displayName: 'Publish Artifact: layout_appx_$(Name)'