Skip to content

Commit 86c7a08

Browse files
Removed Cert and password
1 parent c017b31 commit 86c7a08

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/pipeline.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
build-test-release:
1111
name: Build/Test/Release
1212
runs-on: windows-latest
13+
env:
14+
CERT_NAME: cert.pfx
1315

1416
steps:
1517
- uses: actions/checkout@v4
@@ -58,9 +60,14 @@ jobs:
5860
mkdir DevOpsDaysTasks/Help
5961
cp workshop_material/Help.pdf DevOpsDaysTasks/Help
6062
61-
# Problem: Cert (external file) and password hardcoded
63+
- name: Create PFX certificate
64+
run: |
65+
$bas64Pfx = "${{ secrets.SIGN_CERTIFICATE_PFX_BASE64 }}"
66+
$encodedBytes = [System.Convert]::FromBase64String($bas64Pfx)
67+
Set-Content ${{ env.CERT_NAME }} -Value $encodedBytes -AsByteStream
68+
6269
- name: Sign release
63-
run: .\scripts\sign.ps1 .\DevOpsDaysTasks\DevOpsDaysTasks.UI.exe -PfxFile .\workshop_material\devopsdays_tasks_codesign.pfx -PfxPassword Password
70+
run: .\scripts\sign.ps1 .\DevOpsDaysTasks\DevOpsDaysTasks.UI.exe -PfxFile ${{ env.CERT_NAME }} -PfxPassword ${{ secrets.SIGN_CERTIFICATE_PASSWORD }}
6471

6572
# Problem: Only upload to pipeline not to GitHub Releases
6673
- name: Upload release

0 commit comments

Comments
 (0)