Skip to content

Build your personal knowledge base with Trilium Notes

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

Elian Doran5d982ea43871
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 83b9c436ca..ecd3316d0f 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -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' }}
diff --git a/bin/electron-forge/sign-windows.cjs b/bin/electron-forge/sign-windows.cjs
index caa64dbc69..662fe5eef2 100644
--- a/bin/electron-forge/sign-windows.cjs
+++ b/bin/electron-forge/sign-windows.cjs
@@ -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}`);