Build Electron App #25
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: Build Electron App | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create Draft Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: true | |
prerelease: false | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: npm install | |
- name: Build Electron App for Windows | |
run: npm run build && npx electron-builder --linux --config | |
- name: Upload Linux Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: linux-app | |
path: dist/*.AppImage | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: npm install | |
- name: Build Electron App for Windows | |
run: npm run build && npx electron-builder --win --config | |
- name: Upload Windows Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows-app | |
path: dist/*.exe | |
build-mac: | |
runs-on: macos-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Import Apple Developer Certificate | |
env: | |
MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }} | |
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} | |
run: | | |
echo "$MAC_CERTIFICATE" | base64 --decode > certificate.p12 | |
security create-keychain -p "" build.keychain | |
security default-keychain -s build.keychain | |
security unlock-keychain -p "" build.keychain | |
security import certificate.p12 -k build.keychain -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign | |
security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain | |
security find-identity -v | |
- name: Install dependencies | |
run: npm install | |
- name: Resign modules | |
run: npm run resign | |
- name: Build Electron App for Mac | |
run: npm run build && npx electron-builder --mac --config | |
env: | |
CSC_NAME: "Jan Vincent Lunge (BLH4PG2L7J)" | |
CSC_KEYCHAIN: build.keychain | |
- name: Upload Mac Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: mac-app | |
path: dist/*.dmg | |