Release v0.3.5 #110
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 | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-macos-intel: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: | | |
npm install --include=dev | |
cd frontend | |
npm install --include=dev | |
- name: Build frontend with Vite | |
run: | | |
cd frontend | |
npx vite build | |
- name: Prepare for code signing | |
run: | | |
mkdir -p ~/private_keys/ | |
echo "${{ secrets.MAC_CERTS }}" | base64 --decode > ~/private_keys/certs.p12 | |
echo "${{ secrets.NOTA_CERT }}" | base64 --decode > ~/private_keys/notarize.p8 | |
security create-keychain -p "" build.keychain | |
security default-keychain -s build.keychain | |
security unlock-keychain -p "" build.keychain | |
security import ~/private_keys/certs.p12 -k build.keychain -P "${{ secrets.MAC_CERTS_PASSWORD }}" -T /usr/bin/codesign | |
security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain | |
- name: Build/release Electron app (macOS - x64) | |
uses: samuelmeuli/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
release: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
publish: always | |
args: --mac --x64 # Build for Intel architecture | |
env: | |
CSC_LINK: file:///Users/runner/private_keys/certs.p12 | |
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTS_PASSWORD }} | |
API_KEY_ID: ${{ vars.API_KEY_ID }} | |
API_KEY_ISSUER_ID: ${{ vars.API_KEY_ISSUER_ID }} | |
build-macos-arm: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: | | |
npm install --include=dev | |
cd frontend | |
npm install --include=dev | |
- name: Build frontend with Vite | |
run: | | |
cd frontend | |
npx vite build | |
- name: Prepare for code signing | |
run: | | |
mkdir -p ~/private_keys/ | |
echo "${{ secrets.MAC_CERTS }}" | base64 --decode > ~/private_keys/certs.p12 | |
echo "${{ secrets.NOTA_CERT }}" | base64 --decode > ~/private_keys/notarize.p8 | |
security create-keychain -p "" build.keychain | |
security default-keychain -s build.keychain | |
security unlock-keychain -p "" build.keychain | |
security import ~/private_keys/certs.p12 -k build.keychain -P "${{ secrets.MAC_CERTS_PASSWORD }}" -T /usr/bin/codesign | |
security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain | |
- name: Build/release Electron app (macOS - arm64) | |
uses: samuelmeuli/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
release: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
publish: always | |
args: --mac --arm64 # Build for ARM architecture | |
env: | |
CSC_LINK: file:///Users/runner/private_keys/certs.p12 | |
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTS_PASSWORD }} | |
API_KEY_ID: ${{ vars.API_KEY_ID }} | |
API_KEY_ISSUER_ID: ${{ vars.API_KEY_ISSUER_ID }} | |
build-non-macos: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: | | |
npm install --include=dev | |
cd frontend | |
npm install --include=dev | |
- name: Build frontend with Vite | |
run: | | |
cd frontend | |
npx vite build | |
- name: Build/release Electron app (non-macOS) | |
uses: samuelmeuli/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
release: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
publish: always |