From 95d327c90b3e12741c89a54350b91b3aa22ac4ee Mon Sep 17 00:00:00 2001 From: Rukayat Salami Date: Wed, 1 Nov 2023 12:51:27 +0100 Subject: [PATCH] add-clean-up-for-windows --- .github/workflows/electron-build.yml | 17 ++++++++++++++--- package.json | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/electron-build.yml b/.github/workflows/electron-build.yml index 1b8e56e33e..535d9049e7 100644 --- a/.github/workflows/electron-build.yml +++ b/.github/workflows/electron-build.yml @@ -51,6 +51,20 @@ jobs: echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8 - name: Build/release Electron app + if: startsWith(matrix.os, 'desktop-build') + uses: samuelmeuli/action-electron-builder@v1 + env: + # windows cert credentials + windows_certs: ${{ secrets.windows_certs }} + windows_certs_password: ${{ secrets.windows_certs_password }} + build_script_name: build:windows + # GitHub token, automatically provided to the action + # (No need to define this secret in the repo settings) + github_token: ${{ secrets.github_token }} + + + - name: Build/release Electron app + if: startsWith(matrix.os, 'macos') uses: samuelmeuli/action-electron-builder@v1 env: # macOS notarization API key @@ -68,6 +82,3 @@ jobs: # (No need to define this secret in the repo settings) github_token: ${{ secrets.github_token }} - # If the commit is tagged with a version (e.g. "v1.0.0"), - # release the app after building - release: ${{ startsWith(github.ref, 'refs/tags/v') }} diff --git a/package.json b/package.json index db6a9c93cb..faed14346c 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "start": "cross-env DEBUG=true && yarn rebuild && electron ./app/", "rebuild": "electron-rebuild -m app/node_modules/node-hid && electron-rebuild -m app/node_modules/usb", "build": "yarn clean:build && yarn copy:files && yarn build:prod && yarn build:electron", + "build:windows": "yarn clean:build:windows && yarn copy:files && yarn build:prod && yarn build:electron", "build:e2e": "yarn clean:build:e2e && yarn copy:files:e2e && yarn build:prod && yarn build:electron", "build:prod": "cross-env NODE_OPTIONS='--openssl-legacy-provider' webpack --config ./setup/config/webpack.config.prod", "build:electron": "cross-env NODE_OPTIONS='--openssl-legacy-provider' webpack --config ./setup/config/webpack.config.electron", @@ -42,6 +43,7 @@ "analyze:bundles": "webpack --config ./setup/config/webpack.config.analyze", "copy:files": "cpx \"./setup/react/{index.html,assets/**/*}\" \"./app/build/\"", "clean:build": "rm -rf app/build", + "clean:build:windows": "rmdir /s /q app/build", "copy:files:e2e": "cpx \"./setup/react/{index.html,assets/**/*}\" \"./app/${BUILD_NAME}/\"", "clean:build:e2e": "rm -rf app/${BUILD_NAME}", "clean:dist": "rm -rf dist",