Skip to content

release

release #30

Workflow file for this run

name: Build Electron App
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
platform: linux
target: x86_64-unknown-linux-gnu
- os: windows-latest
platform: windows
target: x86_64-pc-windows-msvc
- os: macos-latest
platform: mac
target: x86_64-apple-darwin
- os: macos-latest
platform: mac
target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set npm registry mirror
run: |
npm config set registry https://registry.npmjs.org/
- name: Install dependencies
run: npm install
- name: Build Electron app
run: |
if [ "${{ matrix.platform }}" = "mac" ]; then
if [ "${{ matrix.target }}" = "x86_64-apple-darwin" ]; then
npm run build -- --mac --x64
elif [ "${{ matrix.target }}" = "aarch64-apple-darwin" ]; then
npm run build -- --mac --arm64
fi
elif [ "${{ matrix.platform }}" = "windows" ]; then
npm run build -- --win --x64
elif [ "${{ matrix.platform }}" = "linux" ]; then
npm run build -- --linux --x64
fi
env:
GH_TOKEN: ${{ secrets.PUBLIC_RELEASE }}
CSC_IDENTITY_AUTO_DISCOVERY: false
- name: List build output
run: |
ls -R release || true
ls -R dist || true
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-${{ matrix.target }}-build
path: |
release/**/*.exe
release/**/*.dmg
release/**/*.AppImage
release/**/*.snap
dist/**/*.exe
dist/**/*.dmg
dist/**/*.AppImage
dist/**/*.snap
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ github.ref }}
name: Release ${{ github.ref }}
draft: false
prerelease: false
files: |
release/**/*.exe
release/**/*.dmg
release/**/*.AppImage
release/**/*.snap
dist/**/*.exe
dist/**/*.dmg
dist/**/*.AppImage
dist/**/*.snap
env:
GITHUB_TOKEN: ${{ secrets.PUBLIC_RELEASE }}