Skip to content

Commit 2c693f8

Browse files
committed
Better non-publish option
1 parent d9b45cd commit 2c693f8

File tree

1 file changed

+25
-17
lines changed

1 file changed

+25
-17
lines changed

ci/repartition-index.yml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,18 @@ stages:
9292
artifact: index
9393
displayName: Publish index artifact
9494

95-
- ${{ if eq(parameters.Publish, 'true') }}:
96-
- ${{ if eq(parameters.SigningCertificate, 'PythonSoftwareFoundation') }}:
97-
- task: DownloadSecureFile@1
98-
name: sshkey
99-
inputs:
100-
secureFile: pydotorg-ssh.ppk
101-
displayName: 'Download PuTTY key'
102-
103-
- powershell: |
104-
git clone https://github.com/python/cpython-bin-deps --revision 9f9e6fc31a55406ee5ff0198ea47bbb445eeb942 --depth 1 --progress -v "putty"
105-
"##vso[task.prependpath]$(gi putty)"
106-
workingDirectory: $(Pipeline.Workspace)
107-
displayName: 'Download PuTTY binaries'
95+
- powershell: |
96+
git clone https://github.com/python/cpython-bin-deps --revision 9f9e6fc31a55406ee5ff0198ea47bbb445eeb942 --depth 1 --progress -v "putty"
97+
"##vso[task.prependpath]$(gi putty)"
98+
workingDirectory: $(Pipeline.Workspace)
99+
displayName: 'Download PuTTY binaries'
100+
101+
- ${{ if and(eq(parameters.Publish, 'true'), eq(parameters.SigningCertificate, 'PythonSoftwareFoundation'), eq(variables['Build.SourceBranchName'], 'main')) }}:
102+
- task: DownloadSecureFile@1
103+
name: sshkey
104+
inputs:
105+
secureFile: pydotorg-ssh.ppk
106+
displayName: 'Download PuTTY key'
108107

109108
- powershell: |
110109
python ci\upload.py
@@ -118,7 +117,16 @@ stages:
118117
UPLOAD_HOST_KEY: $(PyDotOrgHostKey)
119118
UPLOAD_USER: $(PyDotOrgUsername)
120119
UPLOADING_INDEX: true
121-
${{ if eq(parameters.SigningCertificate, 'PythonSoftwareFoundation') }}:
122-
UPLOAD_KEYFILE: $(sshkey.secureFilePath)
123-
${{ else }}:
124-
NO_UPLOAD: 1
120+
UPLOAD_KEYFILE: $(sshkey.secureFilePath)
121+
122+
- ${{ else }}:
123+
- powershell: |
124+
python ci\upload.py
125+
displayName: 'Pretend to publish packages'
126+
env:
127+
UPLOAD_URL: $(PyDotOrgUrlPrefix)python/
128+
UPLOAD_DIR: $(Build.BinariesDirectory)\index
129+
UPLOAD_URL_PREFIX: $(PyDotOrgUrlPrefix)
130+
UPLOAD_PATH_PREFIX: $(PyDotOrgUploadPathPrefix)
131+
UPLOADING_INDEX: true
132+
NO_UPLOAD: 1

0 commit comments

Comments
 (0)