Skip to content

Commit

Permalink
add-clean-up-for-windows
Browse files Browse the repository at this point in the history
  • Loading branch information
RukayatSalami committed Nov 1, 2023
1 parent 8b46af6 commit d569146
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/electron-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,21 @@ jobs:
mkdir -p ~/private_keys/
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
with:
# Specify the build script name for Windows
build_script_name: build:windows
env:
# windows cert credentials
windows_certs: ${{ secrets.windows_certs }}
windows_certs_password: ${{ secrets.windows_certs_password }}
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
Expand All @@ -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') }}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit d569146

Please sign in to comment.