Build nRF Connect for Desktop for Windows x64 #35
Workflow file for this run
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
name: Build nRF Connect for Desktop for Windows x64 | |
on: | |
workflow_dispatch: | |
inputs: | |
workflow_call: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Fetch certificate file | |
shell: bash | |
env: | |
SM_CLIENT_CERT_FILE_B64: | |
${{ secrets.NORDIC_SM_CLIENT_CERT_P12 }} | |
run: | | |
echo "$SM_CLIENT_CERT_FILE_B64" | base64 --decode > /d/Certificate_pkcs12.p12 | |
cat /d/Certificate_pkcs12.p12 | |
if: github.event_name != 'pull_request' | |
- name: Set variables | |
shell: bash | |
run: | | |
echo "SM_HOST=${{ secrets.NORDIC_SM_HOST }}" >> "$GITHUB_ENV" | |
echo "SM_API_KEY=${{ secrets.NORDIC_SM_API_KEY }}" >> "$GITHUB_ENV" | |
echo "SM_KEYPAIR_ALIAS=${{ secrets.NORDIC_SM_KEYPAIR_ALIAS }}" >> "$GITHUB_ENV" | |
echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV" | |
echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.NORDIC_SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV" | |
echo "SM_CODE_SIGNING_CERT_SHA1_HASH=${{ secrets.NORDIC_SM_CERTIFICATE_SHA1_HASH }}" >> "$GITHUB_ENV" | |
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' | |
- 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 | |
msiexec /i smtools-windows-x64.msi /quiet /qn | |
smksp_registrar.exe list | |
smctl.exe keypair ls | |
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user | |
smksp_cert_sync.exe | |
shell: cmd | |
if: github.event_name != 'pull_request' | |
- name: Certificates Sync | |
run: | | |
smctl windows certsync | |
shell: cmd | |
if: github.event_name != 'pull_request' | |
- name: Run Electron Builder | |
run: | | |
export DEBUG=electron-builder | |
export SM_LOG_LEVEL=TRACE | |
npx electron-builder -p never --windows nsis:x64 | |
echo ~/.signingmanager/logs | |
shell: bash | |
if: github.event_name != 'pull_request' | |
- name: Upload | |
uses: ./.github/actions/publish-action | |
with: | |
suffix: windows-x64 | |
if: github.event_name != 'pull_request' |