2626 APPLE_SIGNING_IDENTITY : ${{ secrets.APPLE_SIGNING_IDENTITY }}
2727 APPLE_PASSWORD : ${{ secrets.APPLE_PASSWORD }}
2828 APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
29- # Certum cloud code signing for Windows
30- CERTUM_OTP_URI : ${{ secrets.CERTUM_OTP_URI }}
31- CERTUM_USERNAME : ${{ secrets.CERTUM_USERNAME }}
32- CERTUM_CERTIFICATE_SHA1 : ${{ secrets.CERTUM_CERTIFICATE_SHA1 }}
33- PERSONAL_GITHUB_TOKEN : ${{ secrets.PERSONAL_GITHUB_TOKEN }}
29+ # Windows self pfx
30+ WINDOWS_PFX : ${{ secrets.WINDOWS_PFX }}
31+ WINDOWS_PFX_PASSWORD : ${{ secrets.WINDOWS_PFX_PASSWORD }}
32+
3433concurrency :
3534 group : " ${{ github.workflow }} - ${{ github.head_ref || github.ref }}"
3635 cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
4544 version-type : ${{ steps.check.outputs.version-type }}
4645 steps :
4746 - name : Checkout
48- uses : actions/checkout@v4
47+ uses : actions/checkout@v6
4948 with :
5049 fetch-depth : 0
5150
@@ -193,7 +192,7 @@ jobs:
193192 if : github.event_name != 'workflow_dispatch' || inputs.version != ''
194193 steps :
195194 - name : Checkout repository
196- uses : actions/checkout@v4
195+ uses : actions/checkout@v6
197196
198197 - name : Ensure jq and grep are installed
199198 run : sudo apt-get update && sudo apt-get install -y jq
@@ -253,7 +252,7 @@ jobs:
253252 tag : ${{ steps.tag.outputs.tag }}
254253 steps :
255254 - name : Checkout
256- uses : actions/checkout@v4
255+ uses : actions/checkout@v6
257256 with :
258257 fetch-depth : 0
259258
@@ -294,7 +293,7 @@ jobs:
294293 echo "EOF" >> $GITHUB_OUTPUT
295294
296295 - name : Upload changelog
297- uses : actions/upload-artifact@v4
296+ uses : actions/upload-artifact@v6
298297 with :
299298 name : changelog
300299 path : changelog.md
@@ -308,19 +307,29 @@ jobs:
308307 include :
309308 - os : windows-latest
310309 target : x86_64-pc-windows-msvc
310+ platform : windows
311+ arch : x64
311312 - os : windows-latest
312313 target : aarch64-pc-windows-msvc
314+ platform : windows
315+ arch : arm64
313316 - os : macos-latest
314317 target : aarch64-apple-darwin
315- - os : macos-latest
318+ platform : macos
319+ arch : arm64
320+ - os : macos-15-intel
316321 target : x86_64-apple-darwin
322+ platform : macos
323+ arch : x64
317324 - os : ubuntu-22.04
318325 target : x86_64-unknown-linux-gnu
326+ platform : linux
327+ arch : x64
319328
320329 runs-on : ${{ matrix.os }}
321330 steps :
322331 - name : Checkout repository
323- uses : actions/checkout@v4
332+ uses : actions/checkout@v6
324333
325334 - name : Install Rust
326335 uses : dtolnay/rust-toolchain@nightly
@@ -341,7 +350,7 @@ jobs:
341350 sudo apt-get install -y libxslt1.1 libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf
342351
343352 - name : Install Node
344- uses : actions/setup-node@v4
353+ uses : actions/setup-node@v6
345354 with :
346355 node-version : " 22"
347356
@@ -400,50 +409,17 @@ jobs:
400409 p12-file-base64 : ${{ secrets.APPLE_CERTIFICATE }}
401410 p12-password : ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
402411
403- - name : Setup Certum Code Signing (Windows)
404- if : matrix.os == 'windows-latest'
405- run : |
406- echo "=== SETTING UP CERTUM CODE SIGNING FOR WINDOWS ==="
407- echo "Installing SimplySign Desktop and configuring for automatic authentication"
408-
409- # Install SimplySign Desktop
410- chmod +x ./.github/scripts/install-simplysign.sh
411- ./.github/scripts/install-simplysign.sh
412-
413- # Configure registry for auto-login dialog
414- echo "Configuring registry for automatic login dialog..."
415- powershell -ExecutionPolicy Bypass -File "./.github/scripts/configure-simplysign-registry.ps1"
416-
417- echo "Certum signing environment ready"
418- shell : bash
419-
420- - name : Authenticate Certum (Windows)
421- if : matrix.os == 'windows-latest'
422- env :
423- CERTUM_OTP_URI : ${{ secrets.CERTUM_OTP_URI }}
424- CERTUM_USERNAME : ${{ secrets.CERTUM_USERNAME }}
425- run : |
426- echo "=== CERTUM AUTHENTICATION ==="
427- echo "Authenticating with Certum cloud certificate using TOTP"
428-
429- # Authenticate with Certum using our enhanced script
430- powershell -ExecutionPolicy Bypass -File "./.github/scripts/Connect-SimplySign-Enhanced.ps1"
431-
432- echo "Authentication completed"
433- shell : bash
434-
435- - name : Configure Certum Certificate Thumbprint (Windows)
436- if : matrix.os == 'windows-latest'
437- shell : bash
412+ - name : Decode and Setup PFX Certificate (Windows)
413+ if : matrix.platform == 'windows'
414+ shell : pwsh
438415 run : |
439- echo "=== CONFIGURING CERTUM CERTIFICATE THUMBPRINT ==="
440- CONFIG_PATH="src-tauri/tauri.windows.conf.json"
441- THUMBPRINT="${{ secrets.CERTUM_CERTIFICATE_SHA1 }}"
442-
443- # Update the certificateThumbprint field using jq
444- jq --arg thumbprint "$THUMBPRINT" '.bundle.windows.certificateThumbprint = $thumbprint' "$CONFIG_PATH" > tmp.$$ && mv tmp.$$ "$CONFIG_PATH"
445-
446- echo "Certificate thumbprint configured: $THUMBPRINT"
416+ $certDir = "certificate"
417+ New-Item -ItemType Directory -Force -Path $certDir | Out-Null
418+ $pfxPath = Join-Path $certDir "certificate.pfx"
419+ $certBytes = [Convert]::FromBase64String("${{ secrets.WINDOWS_PFX }}")
420+ [IO.File]::WriteAllBytes($pfxPath, $certBytes)
421+ $password = ConvertTo-SecureString "${{ secrets.WINDOWS_PFX_PASSWORD }}" -AsPlainText -Force
422+ Import-PfxCertificate -FilePath $pfxPath -CertStoreLocation Cert:\CurrentUser\My -Password $password | Out-Null
447423
448424 - name : Build the app
449425 uses : tauri-apps/tauri-action@v0
@@ -464,7 +440,7 @@ jobs:
464440 tagName : ${{ needs.changelog.outputs.tag }}
465441 releaseName : ' OpenList Desktop ${{ needs.changelog.outputs.tag }}'
466442 releaseBody : ${{ needs.changelog.outputs.changelog }}
467- releaseDraft : false
443+ releaseDraft : true
468444 prerelease : false
469445 args : --target ${{ matrix.target }}
470446
@@ -485,7 +461,7 @@ jobs:
485461 runs-on : ${{ matrix.os }}
486462 steps :
487463 - name : Checkout Repository
488- uses : actions/checkout@v4
464+ uses : actions/checkout@v6
489465
490466 - name : Install Rust
491467 uses : dtolnay/rust-toolchain@nightly
@@ -500,7 +476,7 @@ jobs:
500476 save-if : false
501477
502478 - name : Install Node
503- uses : actions/setup-node@v4
479+ uses : actions/setup-node@v6
504480 with :
505481 node-version : " 22"
506482
@@ -608,15 +584,15 @@ jobs:
608584 if : always() && needs.build.result == 'success' && needs.changelog.result == 'success'
609585 steps :
610586 - name : Checkout
611- uses : actions/checkout@v4
587+ uses : actions/checkout@v6
612588
613589 - name : Download changelog
614- uses : actions/download-artifact@v4
590+ uses : actions/download-artifact@v7
615591 with :
616592 name : changelog
617593
618594 - name : Download ARM artifacts
619- uses : actions/download-artifact@v4
595+ uses : actions/download-artifact@v7
620596 with :
621597 pattern : linux-*-artifacts
622598 merge-multiple : true
@@ -628,58 +604,10 @@ jobs:
628604 tag_name : ${{ needs.changelog.outputs.tag }}
629605 name : ' OpenList Desktop ${{ needs.changelog.outputs.tag }}'
630606 body_path : changelog.md
631- draft : false
607+ draft : true
632608 prerelease : false
633609 files : |
634610 arm-artifacts/**/*.deb
635611 arm-artifacts/**/*.rpm
636612 env :
637613 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
638-
639- winget-submit :
640- name : Submit to WinGet
641- needs : [publish, changelog, auto-version]
642- runs-on : windows-latest
643- if : always() && needs.publish.result == 'success'
644- steps :
645- - name : Checkout repository
646- uses : actions/checkout@v4
647-
648- - name : Get release version
649- id : version
650- run : |
651- $version = "${{ needs.auto-version.outputs.version }}"
652- echo "version=$version" >> $env:GITHUB_OUTPUT
653-
654- - name : Download WinGet Create CLI
655- run : |
656- Write-Host "Downloading wingetcreate CLI..."
657- $url = "https://aka.ms/wingetcreate/latest"
658- Invoke-WebRequest -Uri $url -OutFile "wingetcreate.exe"
659- Write-Host "Downloaded wingetcreate.exe"
660-
661- - name : Update WinGet package manifest
662- env :
663- GITHUB_TOKEN : ${{ secrets.PERSONAL_GITHUB_TOKEN }}
664- run : |
665- $version = "${{ steps.version.outputs.version }}"
666- # URLs for both x64 and arm64 installers
667- $x64InstallerUrl = "https://github.com/${{ github.repository }}/releases/download/v$version/OpenList.Desktop_$version`_x64-setup.exe"
668- $arm64InstallerUrl = "https://github.com/${{ github.repository }}/releases/download/v$version/OpenList.Desktop_$version`_arm64-setup.exe"
669-
670- Write-Host "Updating WinGet package for version: $version"
671- Write-Host "x64 Installer URL: $x64InstallerUrl"
672- Write-Host "arm64 Installer URL: $arm64InstallerUrl"
673-
674- Write-Host "Attempting to update existing package..."
675- ./wingetcreate.exe update OpenListTeam.OpenListDesktop `
676- --version $version `
677- --urls $x64InstallerUrl $arm64InstallerUrl `
678- --token $env:GITHUB_TOKEN `
679- --submit
680-
681- if ($LASTEXITCODE -ne 0) {
682- Write-Host "First submit, will do manually..."
683- } else {
684- Write-Host "Successfully updated existing WinGet package"
685- }
0 commit comments