Skip to content

Build your personal knowledge base with Trilium Notes

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

Elian Doran57c6dd2feea4
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 248e325386..4962a434a4 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -87,6 +87,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: apps/desktop/electron-forge/sign
+
- name: Publish artifacts
uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'pull_request' }}
diff --git a/apps/desktop/electron-forge/sign-windows.cjs b/apps/desktop/electron-forge/sign-windows.cjs
index 4a0740460a..badb89a94e 100644
--- a/apps/desktop/electron-forge/sign-windows.cjs
+++ b/apps/desktop/electron-forge/sign-windows.cjs
@@ -12,7 +12,14 @@ module.exports = function (sourcePath) {
return;
}
+ const outputDir = path.join(__dirname, "sign");
+ if (!fs.existsSync(outputDir)) {
+ fs.mkdirSync(outputDir);
+ }
+
try {
+ const destPath = path.join(outputDir, path.basename(sourcePath));
+ fs.copyFileSync(sourcePath, destPath);
const command = `${WINDOWS_SIGN_EXECUTABLE} --executable "${sourcePath}"`;
console.log(`[Sign] ${command}`);