forked from mixxxdj/mixxx
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'remote_sign' into main
- Loading branch information
Showing
4 changed files
with
91 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,6 +119,7 @@ jobs: | |
APPLE_CODESIGN_IDENTITY: EF241CF990A9BE5477438AEE1F308F76F33FD100 | ||
MACOS_CODESIGN_CERTIFICATE_P12_BASE64: ${{ secrets.MACOS_CODESIGN_CERTIFICATE_P12_BASE64 }} | ||
MACOS_CODESIGN_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CODESIGN_CERTIFICATE_PASSWORD }} | ||
WINDOWS_CODESIGN_CERTIFICATE_PKIX_BASE64: ${{ secrets.WINDOWS_CODESIGN_CERTIFICATE_PKIX_BASE64 }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
name: ${{ matrix.name }} | ||
|
@@ -220,18 +221,11 @@ jobs: | |
echo "CMAKE_ARGS_EXTRA=${CMAKE_ARGS_EXTRA} -DAPPLE_CODESIGN_IDENTITY=${APPLE_CODESIGN_IDENTITY}" >> "${GITHUB_ENV}" | ||
- name: "[Windows] Set up Windows code signing" | ||
env: | ||
WINDOWS_CODESIGN_CERTIFICATE_PATH: ${{ github.workspace }}\packaging\certificates\windows_sectigo_codesign_certificate.pfx | ||
WINDOWS_CODESIGN_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_CERTIFICATE_PASSWORD }} | ||
WINDOWS_CODESIGN_SECURE_FILE_SALT: ${{ secrets.WINDOWS_CODESIGN_SECURE_FILE_SALT }} | ||
WINDOWS_CODESIGN_SECURE_FILE_SECRET: ${{ secrets.WINDOWS_CODESIGN_SECURE_FILE_SECRET }} | ||
if: runner.os == 'Windows' && env.WINDOWS_CODESIGN_SECURE_FILE_SALT != null && env.WINDOWS_CODESIGN_SECURE_FILE_SECRET != null | ||
if: runner.os == 'Windows' && env.WINDOWS_CODESIGN_CERTIFICATE_PKIX_BASE64 != null | ||
run: | | ||
iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/fc44f5c5f2fb184fe738814f373c16cb69c30929/install.ps1')) | ||
appveyor-tools/secure-file -decrypt "$Env:WINDOWS_CODESIGN_CERTIFICATE_PATH.enc" -secret "$Env:WINDOWS_CODESIGN_SECURE_FILE_SECRET" -salt "$Env:WINDOWS_CODESIGN_SECURE_FILE_SALT" | ||
Add-Content -Path "$Env:GITHUB_ENV" -Value "WINDOWS_CODESIGN_CERTIFICATE_PATH=$Env:WINDOWS_CODESIGN_CERTIFICATE_PATH" | ||
Add-Content -Path "$Env:GITHUB_ENV" -Value "WINDOWS_CODESIGN_CERTIFICATE_PASSWORD=$Env:WINDOWS_CODESIGN_CERTIFICATE_PASSWORD" | ||
Add-Content -Path "$Env:GITHUB_ENV" -Value "CMAKE_ARGS_EXTRA=-DWINDOWS_CODESIGN=ON" | ||
$decodedBytes = [System.Convert]::FromBase64String($Env:WINDOWS_CODESIGN_CERTIFICATE_PKIX_BASE64) | ||
[System.IO.File]::WriteAllBytes("windows_codesign.cer", $decodedBytes) | ||
Add-Content -Path "$Env:GITHUB_ENV" -Value "WINDOWS_CODESIGN_CERTIFICATE_PATH=../windows_codesign.cer" | ||
- name: "Set up build environment" | ||
id: buildenv | ||
|
@@ -364,8 +358,9 @@ jobs: | |
APPLE_TEAM_ID: JBLRSP95FC | ||
|
||
- name: "[Windows] Sign Package" | ||
if: runner.os == 'Windows' && env.WINDOWS_CODESIGN_CERTIFICATE_PATH != null && env.WINDOWS_CODESIGN_CERTIFICATE_PASSWORD != null | ||
run: signtool sign /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /f $Env:WINDOWS_CODESIGN_CERTIFICATE_PATH /p $Env:WINDOWS_CODESIGN_CERTIFICATE_PASSWORD *.msi | ||
if: runner.os == 'Windows' && env.WINDOWS_CODESIGN_CERTIFICATE_PATH != null | ||
run: | | ||
signtool sign /fd sha256 /f $Env:WINDOWS_CODESIGN_CERTIFICATE_PATH /v /dg . *.msi | ||
working-directory: build | ||
|
||
- name: "Prepare for deployment" | ||
|
@@ -460,6 +455,31 @@ jobs: | |
name: ${{ matrix.artifacts_name }} | ||
path: ${{ matrix.artifacts_path }} | ||
|
||
- name: "Upload files for remote signing" | ||
if: runner.os == 'Windows' | ||
uses: actions/[email protected] | ||
with: | ||
name: Exe Signing Digest | ||
path: | | ||
build/*.exe.dig | ||
build/*.exe.p7u | ||
- name: "Upload files for remote signing" | ||
if: runner.os == 'Windows' | ||
uses: actions/[email protected] | ||
with: | ||
name: Msi Signing Digest | ||
path: | | ||
build/*.msi.dig | ||
build/*.msi.p7u | ||
- name: "Upload WIX project" | ||
if: runner.os == 'Windows' | ||
uses: actions/[email protected] | ||
with: | ||
name: WIX project | ||
path: build/_CPack_Packages/win64/WIX | ||
|
||
update_manifest: | ||
name: "Update manifest file on download server" | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Sign mixxx.exe | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
workflow_run_id: | ||
description: "Enter the id of the workflow run that has creates the unsigned exe" | ||
required: true | ||
signed_digest: | ||
description: "Enter signed digest, bas64 encoded" | ||
required: true | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-2019 | ||
|
||
steps: | ||
- name: Print status | ||
run: | | ||
echo "Signing workflow ${{ github.event.inputs.workflow_run_id }} with" | ||
echo "${{ github.event.inputs.signed_digest }}" | ||
- name: "Download WIX project" | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: WIX project | ||
run-id: ${{ github.event.inputs.workflow_run_id }} | ||
|
||
- name: Display structure of downloaded files | ||
run: ls -R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Sign mixxx.msi | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
workflow_run_id: | ||
description: "Enter the id of the workflow run that has creates the unsigned exe" | ||
required: true | ||
signed_digest: | ||
description: "Enter signed digest, bas64 encoded" | ||
required: true | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-2019 | ||
|
||
steps: | ||
- name: Print Parameter Value | ||
run: | | ||
echo "The parameter value is ${{ github.event.inputs.parameter_name }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters