mirror of
https://hub.gitmirror.com/https://github.com/ExamAware/ExamShowboard-Legacy.git
synced 2025-04-29 07:06:32 +00:00

修改了构建和发布工件的GitHub操作工作流,以便仅在非预发行版本的情况下为macOS和Linux构建和发布工件。这包括在发布工作流中条件性地运行macOS和Linux构建任务,并相应地调整Windows构建任务。以前,工件会无条件地为所有操作系统构建和上传。
36 lines
774 B
YAML
36 lines
774 B
YAML
name: Build and Package Electron App
|
|
|
|
on: [ push ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ windows-latest ]
|
|
node-version: [ 20.x ]
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4.1.7
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Install dependencies
|
|
run: yarn install
|
|
|
|
- name: Build and package for Windows
|
|
if: matrix.os == 'windows-latest'
|
|
run: yarn build:win
|
|
|
|
- name: Upload artifact for Windows
|
|
if: matrix.os == 'windows-latest'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ExamShowboard-Windows
|
|
path: dist/*.exe
|