@@ -54,15 +54,16 @@ extends:
5454 image : windows-latest
5555 os : windows
5656 stages :
57- - stage : stage
57+ - stage : PublishToPyPi
58+ displayName : " \U0001F6EB Build and Publish to PyPi"
5859 jobs :
5960 - job : " Build_Azure_Quantum_Python"
6061 displayName : Build "azure-quantum" package
6162 templateContext :
6263 outputs :
6364 - output : pipelineArtifact
6465 displayName : ' Upload "azure-quantum" artifacts'
65- targetPath : $(Build.SourcesDirectory)/azure-quantum/target/wheels /
66+ targetPath : $(Build.SourcesDirectory)/azure-quantum/artifacts /
6667 artifactName : azure-quantum-wheels
6768
6869 steps :
@@ -88,10 +89,14 @@ extends:
8889
8990 - script : |
9091 cd $(Build.SourcesDirectory)/azure-quantum
91- python setup.py sdist --dist-dir=target /wheels
92- python setup.py bdist_wheel --dist-dir=target /wheels
92+ python setup.py sdist --dist-dir=artifacts /wheels
93+ python setup.py bdist_wheel --dist-dir=artifacts /wheels
9394 displayName: Build "azure-quantum" package
9495
96+ - script : |
97+ copy set_version.py "$(Build.SourcesDirectory)/azure-quantum/artifacts"
98+ displayName: Copy "set_version.py" to artifacts
99+
95100 - job : " Test_Azure_Quantum_Python"
96101 displayName : Test "azure-quantum" package
97102 steps :
@@ -156,7 +161,7 @@ extends:
156161 displayName : Set Python version
157162
158163 - script : |
159- python set_version.py
164+ python $(Pipeline.Workspace)/azure-quantum-wheels/ set_version.py
160165 env:
161166 BUILD_TYPE: ${{ parameters.Build_Type }}
162167 RELEASE_TYPE: ${{ parameters.Release_Type }}
@@ -170,12 +175,12 @@ extends:
170175 )
171176 displayName : Copy built "azure-quantum" package artifacts
172177 inputs :
173- SourceFolder : ' $(Pipeline.Workspace)/azure-quantum-wheels'
178+ SourceFolder : ' $(Pipeline.Workspace)/azure-quantum-wheels/wheels '
174179 Contents : ' **'
175- TargetFolder : ' $(Build.ArtifactStagingDirectory)/target /wheels'
180+ TargetFolder : ' $(Build.ArtifactStagingDirectory)/artifacts /wheels'
176181
177182 - script : |
178- ls $(Build.ArtifactStagingDirectory)/target /wheels/*
183+ ls $(Build.ArtifactStagingDirectory)/artifacts /wheels/*
179184 displayName: List Py Artifacts to publish
180185
181186 - task : GitHubRelease@1
@@ -192,18 +197,23 @@ extends:
192197 target : $(Build.SourceVersion)
193198 addChangeLog : False
194199 assets : |
195- $(Build.ArtifactStagingDirectory)/target /wheels/*
200+ $(Build.ArtifactStagingDirectory)/artifacts /wheels/*
196201
197- - task : EsrpRelease@4
202+ - task : EsrpRelease@7
198203 condition : ${{ parameters.Publish_Python_Package_To_PyPi }}
199- displayName : Publish "azure-quantum" package to PyPi
204+ displayName : Sign and publish "azure-quantum" package to PyPi
200205 inputs :
201- ConnectedServiceName : ' ESRP_Release'
206+ ConnectedServiceName : ' ESRP Signing Connection'
207+ KeyVaultName : ' kv-aqua-esrp-001'
208+ AuthCertName : ' EsrpAuthCert'
209+ SignCertName : ' EsrpSignCert'
210+ ClientId : ' 832c049d-cd07-4c1c-bfa5-c07250d190cb'
202211 Intent : ' PackageDistribution'
203212 ContentType : ' PyPi'
204- FolderLocation : ' $(Build.ArtifactStagingDirectory)/target/wheels'
205- Owners : ' $(OwnerPersonalAlias)@microsoft.com' # NB: Group email here fails the task with non-actionable output.
213+ FolderLocation : ' $(Build.ArtifactStagingDirectory)/artifacts/wheels'
214+ WaitForReleaseCompletion : true
215+ Owners : ' $(OwnerPersonalAlias)@microsoft.com' # Group email here fails the task with non-actionable output.
206216 Approvers : ' billti@microsoft.com'
207217 ServiceEndpointUrl : ' https://api.esrp.microsoft.com'
208- MainPublisher : ' QuantumDevelpmentKit '
209- DomainTenantId : ' 72f988bf-86f1-41af-91ab-2d7cd011db47'
218+ MainPublisher : ' ESRPRELPACMAN ' # Default ESRP v7 publisher. Do not change.
219+ DomainTenantId : ' 72f988bf-86f1-41af-91ab-2d7cd011db47'
0 commit comments