Skip to content

Commit

Permalink
Try out code signing for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cs1m0n committed Apr 29, 2024
1 parent c24dec0 commit a12e509
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install dependencies
run: npm install

- name: Download certificate file
- name: Download certificate file for Mac
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
echo $APPLE_DEVELOPER_ID_FILE | base64 --decode >> developer-id.p12
Expand All @@ -54,6 +54,25 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Code signing for Windows
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
dotnet tool install --global AzureSignTool --version 2.0.17
AzureSignTool.exe sign -du "https://explorers.biblekids.io" ^
-kvu "https://bccm-code-sign2.vault.azure.net" ^
-kvi $WINDOWS_CLIENT_ID ^
-kvs $WINDOWS_CLIENT_PASSWORD ^
-kvc "BCC MEDIA STI" ^
-tr http://timestamp.digicert.com ^
-v ^
$(System.DefaultWorkingDirectory)\dist-app\Bible-Explorers-Setup-1.6.9.exe
fi
shell: bash
env:
WINDOWS_CLIENT_ID: ${{secrets.BCCM_WINDOWS_CLIENT_ID}}
WINDOWS_CLIENT_PASSWORD: ${{secrets.BCCM_WINDOWS_CLIENT_PASSWORD}}

- name: Building the Electron app for Mac
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
Expand Down
10 changes: 6 additions & 4 deletions electron_builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ const config = {
output: 'dist-app',
},
nsis: {
artifactName: process.platform == 'win32' ? '${productName}-Setup-${version}.${ext}' : '${productName}-${version}.${ext}',
artifactName:
process.platform == 'win32'
? '${productName}-Setup-${version}.${ext}'
: '${productName}-${version}.${ext}',
},
win: {
target: 'nsis',
publisherName: 'BCC Media',
verifyUpdateCodeSignature: false, // Disable publisher name check until we get the signature in place for Windows
legalTrademarks: '(C) 2024 BCC Media',
publisherName: 'BCC MEDIA STI',
legalTrademarks: '(C) 2024 BCC MEDIA STI',
},
mac: {
category: 'public.app-category.game',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bible-explorers",
"version": "1.6.8",
"version": "1.6.9",
"description": "App for Bible Explorers",
"main": ".vite/build/main.js",
"repository": {
Expand Down

0 comments on commit a12e509

Please sign in to comment.