From 57c6dd2feea43fc70f4b2a41c4283bd249680abf Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 30 Apr 2025 11:29:20 +0300 Subject: [PATCH] chore(forge): gather files to be signed for analysis --- .github/workflows/nightly.yml | 7 +++++++ apps/desktop/electron-forge/sign-windows.cjs | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 248e32538..4962a434a 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 4a0740460..badb89a94 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}`);