|
1 | 1 | name: Release_$(Build.SourceBranchName)_$(SourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
|
2 | 2 |
|
| 3 | +parameters: |
| 4 | +- name: GitRemote |
| 5 | + displayName: "Git remote" |
| 6 | + type: string |
| 7 | + default: python |
| 8 | + values: |
| 9 | + - 'python' |
| 10 | + - 'pablogsal' |
| 11 | + - 'ambv' |
| 12 | + - '(Other)' |
| 13 | +- name: GitRemote_Other |
| 14 | + displayName: "If Other, specify Git remote" |
| 15 | + type: string |
| 16 | + default: 'python' |
| 17 | +- name: SourceTag |
| 18 | + displayName: "Git tag" |
| 19 | + type: string |
| 20 | + default: main |
| 21 | +- name: DoPublish |
| 22 | + displayName: "Publish release" |
| 23 | + type: boolean |
| 24 | + default: false |
| 25 | +- name: SigningCertificate |
| 26 | + displayName: "Code signing certificate" |
| 27 | + type: string |
| 28 | + default: 'Python Software Foundation' |
| 29 | + values: |
| 30 | + - 'Python Software Foundation' |
| 31 | + - 'TestSign' |
| 32 | + - 'Unsigned' |
| 33 | +- name: SigningDescription |
| 34 | + displayName: "Signature description" |
| 35 | + type: string |
| 36 | + default: 'Built: $(Build.BuildNumber)' |
| 37 | +- name: DoARM64 |
| 38 | + displayName: "Publish ARM64 build" |
| 39 | + type: boolean |
| 40 | + default: true |
| 41 | +- name: DoPGO |
| 42 | + displayName: "Run PGO" |
| 43 | + type: boolean |
| 44 | + default: true |
| 45 | +- name: DoLayout |
| 46 | + displayName: "Produce full layout artifact" |
| 47 | + type: boolean |
| 48 | + default: true |
| 49 | +- name: DoMSIX |
| 50 | + displayName: "Produce Store packages" |
| 51 | + type: boolean |
| 52 | + default: true |
| 53 | +- name: DoNuget |
| 54 | + displayName: "Produce Nuget packages" |
| 55 | + type: boolean |
| 56 | + default: true |
| 57 | +- name: DoEmbed |
| 58 | + displayName: "Produce embeddable package" |
| 59 | + type: boolean |
| 60 | + default: true |
| 61 | +- name: DoMSI |
| 62 | + displayName: "Produce EXE/MSI installer" |
| 63 | + type: boolean |
| 64 | + default: true |
| 65 | +- name: BuildToPublish |
| 66 | + displayName: "Build number to publish (0 to skip)" |
| 67 | + type: number |
| 68 | + default: '0' |
| 69 | + |
3 | 70 | variables:
|
4 |
| - __RealSigningCertificate: 'Python Software Foundation' |
| 71 | + __RealSigningCertificate: 'Python Software Foundation' |
| 72 | + ${{ if ne(parameters.GitRemote, '(Other)') }}: |
| 73 | + GitRemote: ${{ parameters.GitRemote }} |
| 74 | + ${{ else }}: |
| 75 | + GitRemote: ${{ parameters.GitRemote_Other }} |
| 76 | + SourceTag: ${{ parameters.SourceTag }} |
| 77 | + DoPGO: ${{ parameters.DoPGO }} |
| 78 | + ${{ if ne(parameters.SigningCertificate, 'Unsigned') }}: |
| 79 | + SigningCertificate: ${{ parameters.SigningCertificate }} |
| 80 | + SigningDescription: ${{ parameters.SigningDescription }} |
| 81 | + DoLayout: ${{ parameters.DoLayout }} |
| 82 | + DoMSIX: ${{ parameters.DoMSIX }} |
| 83 | + DoNuget: ${{ parameters.DoNuget }} |
| 84 | + DoEmbed: ${{ parameters.DoEmbed }} |
| 85 | + DoMSI: ${{ parameters.DoMSI }} |
| 86 | + DoPublish: ${{ parameters.DoPublish }} |
| 87 | + PublishARM64: ${{ parameters.DoARM64 }} |
5 | 88 | # QUEUE TIME VARIABLES
|
6 |
| -# GitRemote: python |
7 |
| -# SourceTag: |
8 |
| -# DoPGO: true |
9 |
| -# SigningCertificate: 'Python Software Foundation' |
10 |
| -# SigningDescription: 'Built: $(Build.BuildNumber)' |
11 |
| -# DoLayout: true |
12 |
| -# DoMSIX: true |
13 |
| -# DoNuget: true |
14 |
| -# DoEmbed: true |
15 |
| -# DoMSI: true |
16 |
| -# DoPublish: false |
17 |
| -# PyDotOrgUsername: '' |
18 |
| -# PyDotOrgServer: '' |
19 |
| -# BuildToPublish: '' |
| 89 | +# PyDotOrgUsername: '' |
| 90 | +# PyDotOrgServer: '' |
20 | 91 |
|
21 | 92 | trigger: none
|
22 | 93 | pr: none
|
23 | 94 |
|
24 | 95 | stages:
|
25 |
| -- stage: Build |
26 |
| - displayName: Build binaries |
27 |
| - condition: and(succeeded(), not(variables['BuildToPublish'])) |
28 |
| - jobs: |
29 |
| - - template: windows-release/stage-build.yml |
30 |
| - |
31 |
| -- stage: Sign |
32 |
| - displayName: Sign binaries |
33 |
| - dependsOn: Build |
34 |
| - condition: and(succeeded(), not(variables['BuildToPublish'])) |
35 |
| - jobs: |
36 |
| - - template: windows-release/stage-sign.yml |
37 |
| - |
38 |
| -- stage: Layout |
39 |
| - displayName: Generate layouts |
40 |
| - dependsOn: Sign |
41 |
| - condition: and(succeeded(), not(variables['BuildToPublish'])) |
42 |
| - jobs: |
43 |
| - - template: windows-release/stage-layout-full.yml |
44 |
| - - template: windows-release/stage-layout-embed.yml |
45 |
| - - template: windows-release/stage-layout-nuget.yml |
46 |
| - |
47 |
| -- stage: Pack |
48 |
| - dependsOn: Layout |
49 |
| - condition: and(succeeded(), not(variables['BuildToPublish'])) |
50 |
| - jobs: |
51 |
| - - template: windows-release/stage-pack-nuget.yml |
52 |
| - |
53 |
| -- stage: Test |
54 |
| - dependsOn: Pack |
55 |
| - condition: and(succeeded(), not(variables['BuildToPublish'])) |
56 |
| - jobs: |
57 |
| - - template: windows-release/stage-test-embed.yml |
58 |
| - - template: windows-release/stage-test-nuget.yml |
59 |
| - |
60 |
| -- stage: Layout_MSIX |
61 |
| - displayName: Generate MSIX layouts |
62 |
| - dependsOn: Sign |
63 |
| - condition: and(succeeded(), and(eq(variables['DoMSIX'], 'true'), not(variables['BuildToPublish']))) |
64 |
| - jobs: |
65 |
| - - template: windows-release/stage-layout-msix.yml |
66 |
| - |
67 |
| -- stage: Pack_MSIX |
68 |
| - displayName: Package MSIX |
69 |
| - dependsOn: Layout_MSIX |
70 |
| - condition: and(succeeded(), not(variables['BuildToPublish'])) |
71 |
| - jobs: |
72 |
| - - template: windows-release/stage-pack-msix.yml |
73 |
| - |
74 |
| -- stage: Build_MSI |
75 |
| - displayName: Build MSI installer |
76 |
| - dependsOn: Sign |
77 |
| - condition: and(succeeded(), and(eq(variables['DoMSI'], 'true'), not(variables['BuildToPublish']))) |
78 |
| - jobs: |
79 |
| - - template: windows-release/stage-msi.yml |
80 |
| - |
81 |
| -- stage: Test_MSI |
82 |
| - displayName: Test MSI installer |
83 |
| - dependsOn: Build_MSI |
84 |
| - condition: and(succeeded(), not(variables['BuildToPublish'])) |
85 |
| - jobs: |
86 |
| - - template: windows-release/stage-test-msi.yml |
87 |
| - |
88 |
| -- stage: PublishPyDotOrg |
89 |
| - displayName: Publish to python.org |
90 |
| - dependsOn: ['Test_MSI', 'Test'] |
91 |
| - condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), not(variables['BuildToPublish']))) |
92 |
| - jobs: |
93 |
| - - template: windows-release/stage-publish-pythonorg.yml |
94 |
| - |
95 |
| -- stage: PublishNuget |
96 |
| - displayName: Publish to nuget.org |
97 |
| - dependsOn: Test |
98 |
| - condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), not(variables['BuildToPublish']))) |
99 |
| - jobs: |
100 |
| - - template: windows-release/stage-publish-nugetorg.yml |
101 |
| - |
102 |
| -- stage: PublishStore |
103 |
| - displayName: Publish to Store |
104 |
| - dependsOn: Pack_MSIX |
105 |
| - condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), not(variables['BuildToPublish']))) |
106 |
| - jobs: |
107 |
| - - template: windows-release/stage-publish-store.yml |
108 |
| - |
109 |
| - |
110 |
| -- stage: PublishExistingPyDotOrg |
111 |
| - displayName: Publish existing build to python.org |
112 |
| - dependsOn: [] |
113 |
| - condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), variables['BuildToPublish'])) |
114 |
| - jobs: |
115 |
| - - template: windows-release/stage-publish-pythonorg.yml |
116 |
| - |
117 |
| -- stage: PublishExistingNuget |
118 |
| - displayName: Publish existing build to nuget.org |
119 |
| - dependsOn: [] |
120 |
| - condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), variables['BuildToPublish'])) |
121 |
| - jobs: |
122 |
| - - template: windows-release/stage-publish-nugetorg.yml |
123 |
| - |
124 |
| -- stage: PublishExistingStore |
125 |
| - displayName: Publish existing build to Store |
126 |
| - dependsOn: [] |
127 |
| - condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), variables['BuildToPublish'])) |
128 |
| - jobs: |
129 |
| - - template: windows-release/stage-publish-store.yml |
| 96 | +- ${{ if eq(parameters.BuildToPublish, '0') }}: |
| 97 | + - stage: Build |
| 98 | + displayName: Build binaries |
| 99 | + jobs: |
| 100 | + - template: windows-release/stage-build.yml |
| 101 | + |
| 102 | + - stage: Sign |
| 103 | + displayName: Sign binaries |
| 104 | + dependsOn: Build |
| 105 | + jobs: |
| 106 | + - template: windows-release/stage-sign.yml |
| 107 | + |
| 108 | + - stage: Layout |
| 109 | + displayName: Generate layouts |
| 110 | + dependsOn: Sign |
| 111 | + jobs: |
| 112 | + - template: windows-release/stage-layout-full.yml |
| 113 | + - template: windows-release/stage-layout-embed.yml |
| 114 | + - template: windows-release/stage-layout-nuget.yml |
| 115 | + |
| 116 | + - stage: Pack |
| 117 | + dependsOn: Layout |
| 118 | + jobs: |
| 119 | + - template: windows-release/stage-pack-nuget.yml |
| 120 | + |
| 121 | + - stage: Test |
| 122 | + dependsOn: Pack |
| 123 | + jobs: |
| 124 | + - template: windows-release/stage-test-embed.yml |
| 125 | + - template: windows-release/stage-test-nuget.yml |
| 126 | + |
| 127 | + - stage: Layout_MSIX |
| 128 | + displayName: Generate MSIX layouts |
| 129 | + dependsOn: Sign |
| 130 | + condition: and(succeeded(), eq(variables['DoMSIX'], 'true')) |
| 131 | + jobs: |
| 132 | + - template: windows-release/stage-layout-msix.yml |
| 133 | + |
| 134 | + - stage: Pack_MSIX |
| 135 | + displayName: Package MSIX |
| 136 | + dependsOn: Layout_MSIX |
| 137 | + jobs: |
| 138 | + - template: windows-release/stage-pack-msix.yml |
| 139 | + |
| 140 | + - stage: Build_MSI |
| 141 | + displayName: Build MSI installer |
| 142 | + dependsOn: Sign |
| 143 | + condition: and(succeeded(), eq(variables['DoMSI'], 'true')) |
| 144 | + jobs: |
| 145 | + - template: windows-release/stage-msi.yml |
| 146 | + |
| 147 | + - stage: Test_MSI |
| 148 | + displayName: Test MSI installer |
| 149 | + dependsOn: Build_MSI |
| 150 | + jobs: |
| 151 | + - template: windows-release/stage-test-msi.yml |
| 152 | + |
| 153 | + - ${{ if eq(parameters.DoPublish, 'true') }}: |
| 154 | + - stage: PublishPyDotOrg |
| 155 | + displayName: Publish to python.org |
| 156 | + dependsOn: ['Test_MSI', 'Test'] |
| 157 | + jobs: |
| 158 | + - template: windows-release/stage-publish-pythonorg.yml |
| 159 | + |
| 160 | + - stage: PublishNuget |
| 161 | + displayName: Publish to nuget.org |
| 162 | + dependsOn: Test |
| 163 | + jobs: |
| 164 | + - template: windows-release/stage-publish-nugetorg.yml |
| 165 | + |
| 166 | + - stage: PublishStore |
| 167 | + displayName: Publish to Store |
| 168 | + dependsOn: Pack_MSIX |
| 169 | + jobs: |
| 170 | + - template: windows-release/stage-publish-store.yml |
| 171 | + |
| 172 | +- ${{ else }}: |
| 173 | + - stage: PublishExisting |
| 174 | + displayName: Publish existing build |
| 175 | + dependsOn: [] |
| 176 | + condition: and(succeeded(), eq(variables['DoPublish'], 'true')) |
| 177 | + jobs: |
| 178 | + - template: windows-release/stage-publish-pythonorg.yml |
| 179 | + parameters: |
| 180 | + BuildToPublish: ${{ parameters.BuildToPublish }} |
| 181 | + |
| 182 | + - template: windows-release/stage-publish-nugetorg.yml |
| 183 | + parameters: |
| 184 | + BuildToPublish: ${{ parameters.BuildToPublish }} |
| 185 | + |
| 186 | + - template: windows-release/stage-publish-store.yml |
| 187 | + parameters: |
| 188 | + BuildToPublish: ${{ parameters.BuildToPublish }} |
0 commit comments