build-release #24
Workflow file for this run
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: Electron forge build/release | |
run-name: build-release | |
on: | |
release: | |
types: [released] | |
jobs: | |
release-electron-application: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest-xlarge, windows-latest] | |
arch: [x64, arm64] | |
platform: [darwin, win32] | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.release.tag_name }} | |
- name: Install Node.js and NPM | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: npm ci | |
# macOS build for both x64 and arm64 | |
- name: Publish Electron App release (macOS) | |
if: ${{ matrix.os == 'macos-latest' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.github_token }} | |
DEBUG: "*" | |
run: | | |
npm run publish -- --arch=x64 --platform=darwin | |
npm run publish -- --arch=arm64 --platform=darwin | |
# Windows build | |
- name: Publish Electron App release (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.github_token }} | |
DEBUG: "*" | |
run: npm run publish -- --arch=x64 --platform=win32 |