Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 366c546

Browse files
authored
Fix GPG signing in Windows release build (GH-32089)
1 parent ff619c7 commit 366c546

2 files changed

Lines changed: 26 additions & 41 deletions

File tree

.azure-pipelines/windows-release/gpg-sign.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.azure-pipelines/windows-release/stage-publish-pythonorg.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,32 @@ jobs:
8484
condition: and(succeeded(), ne(variables['PublishARM64'], 'true'))
8585

8686

87-
- template: ./gpg-sign.yml
88-
parameters:
89-
GPGKeyFile: 'python-signing.key'
90-
Files: 'msi\*\*, embed\*.zip'
91-
92-
- template: ./gpg-sign.yml
93-
parameters:
94-
GPGKeyFile: 'python-signing.key'
95-
Files: 'doc\htmlhelp\*.chm'
96-
Condition: and(succeeded(), eq(variables['DoCHM'], 'true'))
87+
- task: DownloadSecureFile@1
88+
name: gpgkey
89+
inputs:
90+
secureFile: 'python-signing.key'
91+
displayName: 'Download GPG key'
92+
93+
- powershell: |
94+
git clone https://github.com/python/cpython-bin-deps --branch gpg --single-branch --depth 1 --progress -v "gpg"
95+
gpg/gpg2.exe --import "$(gpgkey.secureFilePath)"
96+
$files = gci -File "msi\*\*", "embed\*.zip"
97+
if ("$(DoCHM)" -ieq "true") {
98+
$files = $files + (gci -File "doc\htmlhelp\*.chm")
99+
}
100+
$files.FullName | %{
101+
gpg/gpg2.exe -ba --batch --passphrase $(GPGPassphrase) $_
102+
"Made signature for $_"
103+
}
104+
displayName: 'Generate GPG signatures'
105+
workingDirectory: $(Build.BinariesDirectory)
106+
107+
- powershell: |
108+
$p = gps "gpg-agent" -EA 0
109+
if ($p) { $p.Kill() }
110+
displayName: 'Kill GPG agent'
111+
condition: true
112+
97113
98114
- powershell: >
99115
$(Build.SourcesDirectory)\Tools\msi\uploadrelease.ps1

0 commit comments

Comments
 (0)