feat: harden release signing and coverage gate
ForgeFlow quality gate / quality (push) Canceled after 0s
ForgeFlow quality gate / quality (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
const pkg = require("../package.json");
|
||||
|
||||
const expectedPublisher = String(process.env.FORGEFLOW_EXPECTED_PUBLISHER || "").trim();
|
||||
const commonName = expectedPublisher.match(/^CN=([^,]+)/i)?.[1]?.trim();
|
||||
const useAzure = Boolean(String(process.env.FORGEFLOW_AZURE_SIGNING_ENDPOINT || "").trim());
|
||||
const win = { ...pkg.build.win, forceCodeSigning: true };
|
||||
|
||||
if (useAzure) {
|
||||
win.azureSignOptions = {
|
||||
publisherName: commonName,
|
||||
endpoint: process.env.FORGEFLOW_AZURE_SIGNING_ENDPOINT,
|
||||
codeSigningAccountName: process.env.FORGEFLOW_AZURE_SIGNING_ACCOUNT,
|
||||
certificateProfileName: process.env.FORGEFLOW_AZURE_CERTIFICATE_PROFILE,
|
||||
fileDigest: "SHA256",
|
||||
timestampDigest: "SHA256",
|
||||
timestampRfc3161: "http://timestamp.acs.microsoft.com",
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = { ...pkg.build, win };
|
||||
Reference in New Issue
Block a user