ci: use newer sign tool for windows
The electron forge one won't support azure trusted account signing
This commit is contained in:
@@ -53,6 +53,16 @@ jobs:
|
||||
"AZURE_DLIB_PATH=$dlib" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
|
||||
"AZURE_METADATA_JSON_PATH=$env:GITHUB_WORKSPACE\js\build\signing-metadata.json" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
|
||||
|
||||
- name: Locate signtool.exe
|
||||
shell: pwsh
|
||||
working-directory: .
|
||||
run: |
|
||||
$signtool = Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin\*\x64\signtool.exe" -ErrorAction SilentlyContinue |
|
||||
Sort-Object FullName -Descending |
|
||||
Select-Object -First 1
|
||||
if (-not $signtool) { throw "signtool.exe not found in Windows Kits" }
|
||||
"SIGNTOOL_PATH=$($signtool.FullName)" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
|
||||
|
||||
- name: Authenticate to Google Cloud
|
||||
uses: google-github-actions/auth@v2
|
||||
with:
|
||||
|
||||
+19
-15
@@ -7,6 +7,22 @@ import { VitePlugin } from '@electron-forge/plugin-vite';
|
||||
import { FusesPlugin } from '@electron-forge/plugin-fuses';
|
||||
import { FuseV1Options, FuseVersion } from '@electron/fuses';
|
||||
|
||||
// Windows code signing via Azure Trusted Signing. Dormant unless the workflow
|
||||
// provisions the dlib + metadata file and exports these env vars, so local
|
||||
// `yarn make` and unsigned CI builds both work unchanged.
|
||||
const windowsSign = process.env.AZURE_METADATA_JSON_PATH ? {
|
||||
debug: true,
|
||||
signToolPath: process.env.SIGNTOOL_PATH,
|
||||
signWithParams: [
|
||||
'/v',
|
||||
'/fd', 'SHA256',
|
||||
'/tr', 'http://timestamp.acs.microsoft.com',
|
||||
'/td', 'SHA256',
|
||||
'/dlib', process.env.AZURE_DLIB_PATH,
|
||||
'/dmdf', process.env.AZURE_METADATA_JSON_PATH,
|
||||
].join(' '),
|
||||
} : undefined;
|
||||
|
||||
const config: ForgeConfig = {
|
||||
packagerConfig: {
|
||||
asar: true,
|
||||
@@ -22,7 +38,8 @@ const config: ForgeConfig = {
|
||||
osxSign: {},
|
||||
osxNotarize: {
|
||||
keychainProfile: 'default',
|
||||
}
|
||||
},
|
||||
windowsSign
|
||||
},
|
||||
publishers: [
|
||||
{
|
||||
@@ -42,20 +59,7 @@ const config: ForgeConfig = {
|
||||
makers: [
|
||||
new MakerSquirrel((arch) => ({
|
||||
remoteReleases: `https://storage.googleapis.com/flowy-releases/llink/win32/${arch}`,
|
||||
// Windows code signing via Azure Trusted Signing. Dormant unless the workflow
|
||||
// provisions the dlib + metadata file and exports these env vars, so local
|
||||
// `yarn make` and unsigned CI builds both work unchanged.
|
||||
windowsSign: process.env.AZURE_METADATA_JSON_PATH ? {
|
||||
debug: true,
|
||||
signWithParams: [
|
||||
'/v',
|
||||
'/fd', 'SHA256',
|
||||
'/tr', 'http://timestamp.acs.microsoft.com',
|
||||
'/td', 'SHA256',
|
||||
'/dlib', process.env.AZURE_DLIB_PATH,
|
||||
'/dmdf', process.env.AZURE_METADATA_JSON_PATH,
|
||||
].join(' '),
|
||||
} : undefined,
|
||||
windowsSign
|
||||
})),
|
||||
new MakerZIP((arch) => ({
|
||||
macUpdateManifestBaseUrl: `https://storage.googleapis.com/flowy-releases/llink/darwin/${arch}`
|
||||
|
||||
Reference in New Issue
Block a user