Skip to content

Commit

Permalink
Attempt to use other cert & passphrase
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Gardner <[email protected]>
  • Loading branch information
Michael-Gardner committed Jan 19, 2024
1 parent 7a3955b commit be389da
Showing 1 changed file with 13 additions and 24 deletions.
37 changes: 13 additions & 24 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -428,20 +428,17 @@ jobs:
path: ./LN

- name: "Create code signing"
if: ${{ contains(matrix.os,'windows') }}
shell: "pwsh"
env:
SIGN_CERT: ${{ secrets.SIGN_CERT }}
SIGN_PW: ${{ secrets.SIGN_PW }}
run: |
mkdir -p ./sign
cd sign
$pfxPath = "hpcc_code_signing.pfx"
$encodedBytes = [System.Convert]::FromBase64String($env:SIGN_CERT)
$encodedBytes = [System.Convert]::FromBase64String("${{ secrets.SIGNING_CERTIFICATE }}")
$currentDirectory = Get-Location
$certificatePath = Join-Path -Path $currentDirectory -ChildPath $pfxPath
[IO.File]::WriteAllBytes("$certificatePath", $encodedBytes)
echo ${env:SIGN_PW} > passphrase.txt
CertUtil -p ${env:SIGN_PW} hpcc_code_signing.pfx
CertUtil -p ${{ secrets.SIGNING_CERTIFICATE_PASSPHRASE }} hpcc_code_signing.pfx
- name: "vcpkg Bootstrap"
shell: "bash"
Expand All @@ -466,13 +463,12 @@ jobs:
cmake -S ./HPCC-Platform -B ./build ${{ matrix.cmake_config_options }}
cmake --build ./build ${{ matrix.cmake_build_options }} --target package
- name: Sign Packages
- name: Sign Windows Package
if: ${{ contains(matrix.os,'windows') }}
shell: "pwsh"
env:
SIGN_PW: ${{ secrets.SIGN_PW }}
run: |
cd ./build
C:\"Program Files (x86)"\"Microsoft SDKs"\ClickOnce\SignTool\signtool.exe sign /debug /f ../sign/hpcc_code_signing.pfx /p $env:SIGN_PW /t http://timestamp.digicert.com /fd SHA256 hpccsystems-clienttools*.exe
C:\"Program Files (x86)"\"Microsoft SDKs"\ClickOnce\SignTool\signtool.exe sign /debug /f ../sign/hpcc_code_signing.pfx /p ${{ secrets.SIGNING_CERTIFICATE_PASSPHRASE }} /t http://timestamp.digicert.com /fd SHA256 hpccsystems-clienttools*.exe
- name: Upload Assets
uses: ncipollo/[email protected]
Expand All @@ -490,13 +486,12 @@ jobs:
cmake -S ./LN -B ./build ${{ matrix.cmake_config_options }}
cmake --build ./build ${{ matrix.cmake_build_options }} --target package
- name: Sign LN Package
- name: Sign LN Windows Package
if: ${{ contains(matrix.os,'windows') }}
shell: "pwsh"
env:
SIGN_PW: ${{ secrets.SIGN_PW }}
run: |
cd ./build
C:\"Program Files (x86)"\"Microsoft SDKs"\ClickOnce\SignTool\signtool.exe sign /debug /f ../sign/hpcc_code_signing.pfx /p $env:SIGN_PW /t http://timestamp.digicert.com /fd SHA256 hpccsystems-clienttools*.exe
C:\"Program Files (x86)"\"Microsoft SDKs"\ClickOnce\SignTool\signtool.exe sign /debug /f ../sign/hpcc_code_signing.pfx /p ${{ secrets.SIGNING_CERTIFICATE_PASSPHRASE }} /t http://timestamp.digicert.com /fd SHA256 hpccsystems-clienttools*.exe
- name: Upload LN Assets
uses: ncipollo/[email protected]
Expand Down Expand Up @@ -588,21 +583,17 @@ jobs:
dep_tag="${{ needs.preamble.outputs.community_tag }}"
curl -sL -o hpccsystems-clienttools-${dep_tag}Windows-x86_64.exe https://github.com/hpcc-systems/HPCC-Platform/releases/download/${dep_tag}/hpccsystems-clienttools-${dep_tag}Windows-x86_64.exe
- name: "Create code sining"
- name: "Load code signing"
shell: "pwsh"
env:
SIGN_CERT: ${{ secrets.SIGN_CERT }}
SIGN_PW: ${{ secrets.SIGN_PW }}
run: |
mkdir -p ./sign
cd sign
$pfxPath = "hpcc_code_signing.pfx"
$encodedBytes = [System.Convert]::FromBase64String($env:SIGN_CERT)
$encodedBytes = [System.Convert]::FromBase64String("${{ secrets.SIGNING_CERTIFICATE }}")
$currentDirectory = Get-Location
$certificatePath = Join-Path -Path $currentDirectory -ChildPath $pfxPath
[IO.File]::WriteAllBytes("$certificatePath", $encodedBytes)
echo ${env:SIGN_PW} > passphrase.txt
CertUtil -p ${env:SIGN_PW} hpcc_code_signing.pfx
CertUtil -p ${{ secrets.SIGNING_CERTIFICATE_PASSPHRASE }} hpcc_code_signing.pfx
- name: "Build ECLIDE"
run: |
Expand All @@ -614,11 +605,9 @@ jobs:
- name: Sign ECLIDE Package
shell: "pwsh"
env:
SIGN_PW: ${{ secrets.SIGN_PW }}
run: |
cd ./ECLIDE/build
C:\"Program Files (x86)"\"Microsoft SDKs"\ClickOnce\SignTool\signtool.exe sign /debug /f ../../sign/hpcc_code_signing.pfx /p $env:SIGN_PW /t http://timestamp.digicert.com /fd SHA256 hpccsystems-eclide*.exe
C:\"Program Files (x86)"\"Microsoft SDKs"\ClickOnce\SignTool\signtool.exe sign /debug /f ../../sign/hpcc_code_signing.pfx /p ${{ secrets.SIGNING_CERTIFICATE_PASSPHRASE}} /t http://timestamp.digicert.com /fd SHA256 hpccsystems-eclide*.exe
- name: Upload Assets
uses: ncipollo/[email protected]
Expand Down

0 comments on commit be389da

Please sign in to comment.