Update build.yml #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release Electron App | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build_on_win: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 # Latest version | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 # Latest version | |
with: | |
node-version: '19.x' # Use a version range for stability | |
- name: Install dependencies | |
run: | | |
npm ci # Clean install (recommended if using package-lock.json) | |
- name: Build Electron app for Windows | |
run: npm run electron:package:win | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish Artifact | |
id: create_release | |
uses: actions/upload-artifact@v3 # Updated to v3 | |
with: | |
name: Electron-app | |
path: dist/*.exe |