Skip to content

Commit fd807be

Browse files
committed
updating workflow dependencies
1 parent d8f22c0 commit fd807be

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/pipeline.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,26 @@ jobs:
185185
--set-icon "redfetch.ico"
186186
187187
- name: Sign Executable
188-
uses: dlemstra/code-sign-action@v1
189-
with:
190-
certificate: '${{ secrets.CERTIFICATE_PFX }}'
191-
password: '${{ secrets.CERTIFICATE_PFX_PASSWORD }}'
192-
files: |
193-
redfetch.exe
194-
description: 'redfetch executable'
188+
shell: pwsh
189+
run: |
190+
$certPath = Join-Path $env:RUNNER_TEMP "cert.pfx"
191+
[IO.File]::WriteAllBytes($certPath, [Convert]::FromBase64String("${{ secrets.CERTIFICATE_PFX }}"))
192+
193+
$signtool = Get-ChildItem -Path "${env:ProgramFiles(x86)}\Windows Kits" -Recurse -Filter "signtool.exe" |
194+
Where-Object { $_.FullName -match "\\x64\\" } |
195+
Sort-Object LastWriteTime -Descending |
196+
Select-Object -First 1 -ExpandProperty FullName
197+
198+
if (-not $signtool) { throw "signtool.exe not found" }
199+
Write-Host "Using signtool: $signtool"
200+
201+
& $signtool sign /f $certPath /p "${{ secrets.CERTIFICATE_PFX_PASSWORD }}" /fd sha256 /tr "http://timestamp.digicert.com" /td sha256 /v redfetch.exe
202+
& $signtool verify /pa /v redfetch.exe
203+
204+
Remove-Item $certPath
195205
196206
- name: Upload Executable Artifact
197-
uses: actions/upload-artifact@v4
207+
uses: actions/upload-artifact@v7
198208
with:
199209
name: redfetch.exe
200210
path: redfetch.exe
@@ -207,7 +217,7 @@ jobs:
207217
- name: Checkout Code
208218
uses: actions/checkout@v6
209219
- name: Download Executable Artifact
210-
uses: actions/download-artifact@v4
220+
uses: actions/download-artifact@v8
211221
with:
212222
name: redfetch.exe
213223
- name: Redguides Publish

0 commit comments

Comments
 (0)