moving windows build to local entirely, hopefully with github release upload included!
This commit is contained in:
@@ -5,7 +5,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macOS-11]
|
||||
os: [ubuntu-latest, macOS-11]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
|
||||
@@ -43,3 +43,4 @@ desktop-app/sources/*.json
|
||||
tmp
|
||||
.DS_Store
|
||||
**/.DS_Store
|
||||
|
||||
|
||||
+3
-2
@@ -14,7 +14,7 @@
|
||||
"start:test2": "concurrently \"yarn electron-build && yarn platform-tools && wait-on http-get://localhost:4205/ && cross-env NODE_ENV=dev SQ_ENV_CFG=test2 electron .\" \"cd desktop-app && ng serve -c test2 --port 4205\"",
|
||||
"start:local": "concurrently \"yarn electron-build && yarn platform-tools && wait-on http-get://localhost:4205/ && cross-env NODE_ENV=dev SQ_ENV_CFG=local electron .\" \"cd desktop-app && ng serve -c local --port 4205\"",
|
||||
"postinstall": "electron-builder install-app-deps && cd desktop-app && yarn install",
|
||||
"dist": "yarn electron-build && yarn platform-tools && yarn app-build && electron-builder",
|
||||
"dist": "yarn electron-build && yarn platform-tools && yarn app-build && env-cmd -f ./.env.test electron-builder",
|
||||
"dist-test": "yarn electron-build && yarn platform-tools && yarn app-build-test && cross-env SQ_ENV_CFG=test electron-builder",
|
||||
"angular": "cd desktop-app && ng serve --port 4205",
|
||||
"angular:test": "cd desktop-app && ng serve -c test --port 4205",
|
||||
@@ -46,8 +46,9 @@
|
||||
},
|
||||
"win": {
|
||||
"artifactName": "${productName}-${version}-${arch}-${os}.${ext}",
|
||||
"sign": "./build/windows-codesign.js",
|
||||
"target": [
|
||||
"zip"
|
||||
"nsis"
|
||||
]
|
||||
},
|
||||
"linux": {
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
'use strict';
|
||||
|
||||
const util = require('util');
|
||||
const exec = util.promisify(require('child_process').exec);
|
||||
const chalk = require('chalk');
|
||||
|
||||
const OwnerName = process.env.CERT_OWNERNAME || `"SideQuest LTD"`;
|
||||
const TimeStampServer = process.env.CERT_TIMESTAMPSERVER || 'http://time.certum.pl/';
|
||||
const Verbose = (process.env.CERT_VERBOSE && process.env.CERT_VERBOSE === 'true') || false;
|
||||
const Debug = (process.env.CERT_DEBUG && process.env.CERT_DEBUG === 'true') || false;
|
||||
const Skip = (process.env.CERT_SKIP && process.env.CERT_SKIP === 'true') || false;
|
||||
|
||||
async function doSign(file, hash, owner) {
|
||||
const sha256 = hash === 'sha256';
|
||||
const appendCert = sha256 ? '/as' : null;
|
||||
const timestamp = sha256 ? '/tr' : '/t';
|
||||
const appendTd = sha256 ? '/td sha256' : null;
|
||||
const debug = Debug ? '/debug' : null;
|
||||
|
||||
let args = [
|
||||
'signtool',
|
||||
'sign',
|
||||
debug,
|
||||
'/n',
|
||||
owner,
|
||||
'/a',
|
||||
appendCert,
|
||||
'/fd',
|
||||
hash,
|
||||
timestamp,
|
||||
TimeStampServer,
|
||||
appendTd,
|
||||
'/v',
|
||||
`"${file}"`,
|
||||
];
|
||||
|
||||
try {
|
||||
const { stdout } = await exec(args.join(' '));
|
||||
if (Verbose) {
|
||||
console.log(stdout);
|
||||
}
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = async function(config) {
|
||||
if (!Skip) {
|
||||
console.info(
|
||||
`Signing ${chalk.green.bold(config.path)} with ${chalk.magenta(config.hash)} to ${chalk.cyan.bold(OwnerName)}`
|
||||
);
|
||||
await doSign(config.path, config.hash, OwnerName);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user