@@ -2,20 +2,25 @@ name: Build KeepKey Desktop v3.2.0 Release
22
33on :
44 workflow_dispatch :
5+ push :
6+ branches :
7+ - release-3.2.0
58
69jobs :
710 build-release :
811 runs-on : ${{ matrix.os }}
12+ permissions :
13+ contents : write
914 strategy :
1015 fail-fast : false
1116 matrix :
12- os : [ubuntu-latest, windows-latest, macos-14 ]
13-
17+ os : [ubuntu-latest]
18+
1419 steps :
15- - name : Checkout v3 .2.0 tag
20+ - name : Checkout release-3 .2.0 branch
1621 uses : actions/checkout@v4
1722 with :
18- ref : v3 .2.0
23+ ref : release-3 .2.0
1924 submodules : true
2025
2126 - name : Setup Node
6065 if : startsWith(matrix.os, 'ubuntu')
6166 run : |
6267 cd packages/keepkey-desktop
63- yarn electron-builder --linux --publish=never
68+ yarn electron-builder --linux --publish always
6469 env :
6570 NODE_ENV : production
71+ GH_TOKEN : ${{ github.token }}
6672
6773 - name : Upload Windows Artifacts
6874 if : startsWith(matrix.os, 'windows')
@@ -99,58 +105,49 @@ jobs:
99105 packages/keepkey-desktop/dist/*.AppImage.blockmap
100106 if-no-files-found : error
101107
102- sign -and-upload :
108+ create -and-upload-release :
103109 needs : build-release
104- runs-on : windows-latest
110+ runs-on : ubuntu-latest
111+ permissions :
112+ contents : write
105113 steps :
106- - name : Download Windows Artifacts
114+ - name : Checkout
115+ uses : actions/checkout@v4
116+ with :
117+ ref : release-3.2.0
118+
119+ - name : Download Linux Artifacts
107120 uses : actions/download-artifact@v4
108121 with :
109- name : windows -packages
110- path : ./windows-packages
122+ name : linux -packages
123+ path : ./dist
111124
112125 - name : List Downloaded Files
113126 run : |
114- Write-Host "Downloaded Windows packages:"
115- Get-ChildItem -Path ./windows-packages -Recurse | ForEach-Object {
116- Write-Host " $($_.Name) ($([math]::Round($_.Length / 1MB, 2)) MB)"
117- }
127+ echo "Downloaded packages:"
128+ ls -la ./dist/
129+ for file in ./dist/*; do
130+ echo " $(basename $file) ($(du -h $file | cut -f1))"
131+ done
118132
119- - name : Sign Windows Packages (if certificate available)
120- run : |
121- $signTool = "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\signtool.exe"
122- $thumbprint = "986AEBA61CF6616393E74D8CBD3A09E836213BAA"
123-
124- if (Test-Path $signTool) {
125- Write-Host "SignTool found, checking for certificate..."
126- $cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where-Object { $_.Thumbprint -eq $thumbprint }
127- if (-not $cert) {
128- $cert = Get-ChildItem -Path "Cert:\LocalMachine\My" | Where-Object { $_.Thumbprint -eq $thumbprint }
129- }
130-
131- if ($cert) {
132- Write-Host "Certificate found, signing packages..."
133- $windowsFiles = Get-ChildItem -Path ./windows-packages -Filter "*.exe" -Recurse
134- $windowsFiles += Get-ChildItem -Path ./windows-packages -Filter "*.msi" -Recurse
135-
136- foreach ($file in $windowsFiles) {
137- Write-Host "Signing $($file.Name)..."
138- & $signTool sign /sha1 $thumbprint /fd sha256 /tr "http://timestamp.sectigo.com" /td sha256 /v $file.FullName
139- }
140- } else {
141- Write-Host "Certificate not found, skipping signing"
142- }
143- } else {
144- Write-Host "SignTool not found, skipping signing"
145- }
146-
147- - name : Upload Signed Packages to Release
133+ - name : Create Release (if not exists) and Upload
148134 run : |
149- Write-Host "Uploading packages to v3.2.0 release..."
150- $files = Get-ChildItem -Path ./windows-packages -File -Recurse
151- foreach ($file in $files) {
152- Write-Host "Uploading $($file.Name)..."
153- gh release upload v3.2.0 $file.FullName --clobber --repo keepkey/keepkey-desktop
154- }
135+ # Create release if it doesn't exist
136+ if ! gh release view v3.2.0 --repo keepkey/keepkey-desktop &>/dev/null; then
137+ echo "Creating v3.2.0 release..."
138+ gh release create v3.2.0 \
139+ --title "KeepKey Desktop v3.2.0" \
140+ --notes "Release v3.2.0" \
141+ --target release-3.2.0 \
142+ --repo keepkey/keepkey-desktop
143+ fi
144+
145+ # Upload all artifacts with proper names
146+ echo "Uploading artifacts to release..."
147+ for file in ./dist/*; do
148+ filename=$(basename "$file")
149+ echo "Uploading $filename..."
150+ gh release upload v3.2.0 "$file" --clobber --repo keepkey/keepkey-desktop
151+ done
155152 env :
156- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
153+ GH_TOKEN : ${{ github.token }}
0 commit comments