Skip to content

Commit

Permalink
Update build process to generate dev certificate and use environment …
Browse files Browse the repository at this point in the history
…variables for certificate path and password
  • Loading branch information
Thavarshan committed Aug 31, 2024
1 parent 0fa6751 commit 951cd26
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ jobs:
$certPath = "$(Get-Location)\devcert.pfx"
$cert = New-SelfSignedCertificate -DnsName "CN=DevCert" -CertStoreLocation "Cert:\CurrentUser\My" -NotAfter (Get-Date).AddYears(1)
Export-PfxCertificate -Cert $cert -FilePath $certPath -Password (ConvertTo-SecureString -String $certPassword -Force -AsPlainText)
echo "CERT_PATH=$certPath" >> $GITHUB_ENV
echo "CERT_PASSWORD=$certPassword" >> $GITHUB_ENV
echo "CERT_PATH=$certPath" >> "$GITHUB_ENV"
echo "CERT_PASSWORD=$certPassword" >> "$GITHUB_ENV"
echo "Generated CERT_PATH: $certPath"
echo "Generated CERT_PASSWORD: $certPassword"
shell: pwsh

- name: Verify CERT_PATH and CERT_PASSWORD
run: |
if (-not ${{ env.CERT_PATH }}) {
if (-not $env:CERT_PATH) {
Write-Error "CERT_PATH is not set."
exit 1
}
if (-not ${{ env.CERT_PASSWORD }}) {
if (-not $env:CERT_PASSWORD) {
Write-Error "CERT_PASSWORD is not set."
exit 1
}
Expand Down

0 comments on commit 951cd26

Please sign in to comment.