Skip to content

Commit 3c09d68

Browse files
Refactor build workflow to properly handle certificate secrets
Removed debug output listing and added setup for code signing certificate.
1 parent b090924 commit 3c09d68

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,15 @@ jobs:
4242
-c ${{ env.BUILD_CONFIGURATION }} `
4343
/p:Version=${{ steps.version.outputs.version }}
4444
45-
- name: Debug - List build output contents
46-
shell: pwsh
45+
- name: Setup Code Signing Certificate
4746
run: |
48-
$outputDir = "${{ github.workspace }}\bin\${{ env.BUILD_CONFIGURATION }}\net9.0"
49-
Write-Host "Listing contents of: $outputDir"
50-
if (-Not (Test-Path $outputDir)) {
51-
Write-Error "Output folder not found: $outputDir"
52-
exit 1
53-
}
54-
Get-ChildItem $outputDir -Recurse | ForEach-Object {
55-
Write-Host $_.FullName
56-
}
47+
Write-Host "Setting up code signing certificate from GitHub secrets..."
5748
58-
- name: Decode signing certificate
59-
shell: pwsh
60-
run: |
49+
# Create certificate file from secret (base64 encoded)
6150
$certBytes = [Convert]::FromBase64String("${{ secrets.SIGNING_CERTIFICATE_2023_2026 }}")
62-
$certPath = "${{ runner.temp }}\certificate.pfx"
63-
[IO.File]::WriteAllBytes($certPath, $certBytes)
64-
Write-Host "Certificate written to: $certPath"
51+
[System.IO.File]::WriteAllBytes("${{ runner.temp }}\certificate.pfx", $certBytes)
52+
Write-Host "Certificate written to: $certPath"
53+
shell: pwsh
6554

6655
- name: Sign all DLL files
6756
shell: pwsh

0 commit comments

Comments
 (0)