Skip to content

build(deps-dev): bump electron-builder from 26.0.12 to 26.7.0 #71

build(deps-dev): bump electron-builder from 26.0.12 to 26.7.0

build(deps-dev): bump electron-builder from 26.0.12 to 26.7.0 #71

Workflow file for this run

name: 打包并生成应用
on:
pull_request:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4.1.7
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Configure electron-builder binaries mirror
run: echo "ELECTRON_BUILDER_BINARIES_MIRROR=https://mirrors.huaweicloud.com/electron-builder-binaries/" >> $GITHUB_ENV
- name: Fix permissions for app-builder-bin
if: matrix.os == 'ubuntu-latest'
run: chmod +x ./node_modules/.pnpm/app-builder-bin@*/node_modules/app-builder-bin/linux/x64/app-builder
- name: Build and package for Windows
if: matrix.os == 'windows-latest'
run: pnpm run build:win
- name: Build and package for macOS
if: matrix.os == 'macos-latest'
run: pnpm run build:mac
- name: Build and package for Linux
if: matrix.os == 'ubuntu-latest'
run: pnpm run build:linux
- name: Upload artifact for Windows
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: ExamShowboardCar-Windows
path: dist/*.exe
- name: Upload artifact for macOS
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: ExamShowboardCar-macOS
path: dist/*.dmg
- name: Upload artifact for Linux
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: ExamShowboardCar-Linux
path: dist/*.AppImage
- name: Upload assets to GitHub Release
if: github.event_name == 'release' && github.event.action == 'published'
uses: softprops/action-gh-release@v1
with:
files: |
dist/*.exe
dist/*.dmg
dist/*.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}