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}`);