-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da7c5fe
commit af76a0a
Showing
3 changed files
with
21 additions
and
32 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
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 |
---|---|---|
|
@@ -3,6 +3,10 @@ name: Build nRF Connect for Desktop for Windows x64 | |
on: | ||
workflow_dispatch: | ||
inputs: | ||
sign: | ||
type: boolean | ||
default: false | ||
required: true | ||
workflow_call: | ||
|
||
jobs: | ||
|
@@ -19,7 +23,7 @@ jobs: | |
run: | | ||
echo "$SM_CLIENT_CERT_FILE_B64" | base64 --decode > /d/Certificate_pkcs12.p12 | ||
cat /d/Certificate_pkcs12.p12 | ||
if: github.event_name != 'pull_request' | ||
if: ${{ github.event_name != 'pull_request' && inputs.sign}} | ||
|
||
- name: Set variables | ||
shell: bash | ||
|
@@ -33,28 +37,11 @@ jobs: | |
echo "C:\\Program Files (x86)\\Windows Kits\\10\\App Certification Kit" >> $GITHUB_PATH | ||
echo "C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.8 Tools" >> $GITHUB_PATH | ||
echo "C:\\Program Files\\DigiCert\\DigiCert One Signing Manager Tools" >> $GITHUB_PATH | ||
if: github.event_name != 'pull_request' | ||
if: ${{ github.event_name != 'pull_request' && inputs.sign}} | ||
|
||
- name: Build | ||
uses: ./.github/actions/build-action | ||
|
||
# - name: Code signing with Software Trust Manager | ||
# uses: digicert/[email protected] | ||
# env: | ||
# SM_HOST: ${{ env.SM_HOST }} | ||
# SM_API_KEY: ${{ env.SM_API_KEY }} | ||
# SM_KEYPAIR_ALIAS: ${{ env.SM_KEYPAIR_ALIAS }} | ||
# SM_CLIENT_CERT_FILE: ${{ env.SM_CLIENT_CERT_FILE }} | ||
# SM_CLIENT_CERT_PASSWORD: ${{ env.SM_CLIENT_CERT_PASSWORD }} | ||
# SM_CODE_SIGNING_CERT_SHA1_HASH: | ||
# ${{ env.SM_CODE_SIGNING_CERT_SHA1_HASH }} | ||
# if: github.event_name != 'pull_request' | ||
|
||
# - name: Initiate the client tools setup | ||
# run: | ||
# echo “The config file path ${{ | ||
# steps.SSMClientToolSetup.outputs.PKCS11_CONFIG }}” | ||
|
||
- name: Setup signing tools | ||
run: | | ||
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o smtools-windows-x64.msi | ||
|
@@ -64,24 +51,24 @@ jobs: | |
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user | ||
smksp_cert_sync.exe | ||
shell: cmd | ||
if: github.event_name != 'pull_request' | ||
if: ${{ github.event_name != 'pull_request' && inputs.sign}} | ||
|
||
- name: Certificates Sync | ||
run: | | ||
smctl windows certsync | ||
shell: cmd | ||
if: github.event_name != 'pull_request' | ||
if: ${{ github.event_name != 'pull_request' && inputs.sign}} | ||
|
||
- name: Run Electron Builder | ||
run: | | ||
export DEBUG=electron-builder | ||
export SM_LOG_LEVEL=TRACE | ||
npx electron-builder -p never --windows nsis:x64 | ||
cd ~/.signingmanager/logs | ||
ls | ||
cat smctl.log | ||
cat smksp.log | ||
cat smksp_cert_sync.log | ||
# Keep the lines for debugging | ||
# cd ~/.signingmanager/logs | ||
# cat smctl.log | ||
# cat smksp.log | ||
# cat smksp_cert_sync.log | ||
shell: bash | ||
if: github.event_name != 'pull_request' | ||
|
||
|
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