chore(forge): gather files to be signed for analysis

This commit is contained in:
Elian Doran 2025-04-30 11:29:20 +03:00
parent b2f8b0014f
commit 5d982ea438
No known key found for this signature in database
2 changed files with 16 additions and 0 deletions

View File

@ -77,6 +77,13 @@ jobs:
tag_name: nightly
name: Nightly Build
- name: Publish artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: signing ${{ matrix.os.name }} ${{ matrix.arch }}
path: build/bin/electron-forge/sign
- name: Publish artifacts
uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'pull_request' }}

View File

@ -1,5 +1,6 @@
const child_process = require("child_process");
const fs = require("fs");
const { default: path } = require("path");
module.exports = function (filePath) {
const { WINDOWS_SIGN_EXECUTABLE } = process.env;
@ -12,6 +13,14 @@ module.exports = function (filePath) {
return;
}
const outputDir = path.join(__dirname, "sign");
console.log(path.resolve("Output dir is ", outputDir));
if (!fs.existsSync(outputDir)) {
fs.mkdirSync(outputDir);
}
fs.copyFileSync(sourcePath, destPath);
const command = `${WINDOWS_SIGN_EXECUTABLE} --executable "${filePath}"`;
console.log(`[Sign] ${command}`);