fix: use execFile instead of exec to avoid whitespace in path issues.… #39
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 | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- macos-latest | |
# - ubuntu-latest | |
# - windows-latest | |
include: | |
- os: macos-latest | |
make_command: make:mac | |
- os: ubuntu-latest | |
make_command: make:linux | |
- os: windows-latest | |
make_command: make:win | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: | | |
npm install -g @electron-forge/cli | |
npm ci | |
- name: Make Electron app | |
run: npm run ${{ matrix.make_command }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os }}-build | |
path: | | |
out/make/**/*.exe | |
out/make/**/*.msi | |
out/make/**/*.dmg | |
out/make/**/*.zip | |
if-no-files-found: error | |
- name: Publish Electron app | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: npm run publish |