forked from hello8693DSZ/dsz-exam-showboard
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
62325f2
commit 343b753
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Release Build and Package | ||
|
||
on: | ||
pull_request: | ||
branches-ignore: | ||
- 'all-contributors/add-**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
node-version: [20.x] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4.1.7 | ||
if: github.event.release.prerelease == false || matrix.os == 'windows-latest' | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
if: github.event.release.prerelease == false || matrix.os == 'windows-latest' | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
if: github.event.release.prerelease == false || matrix.os == 'windows-latest' | ||
|
||
- name: Build and package for Windows | ||
if: github.event.release.prerelease == false && matrix.os == 'windows-latest' | ||
run: yarn build:win | ||
|
||
- name: Build and package for macOS | ||
if: github.event.release.prerelease == true && matrix.os == 'macos-latest' | ||
run: yarn build:mac | ||
|
||
- name: Build and package for Linux | ||
if: github.event.release.prerelease == true && matrix.os == 'ubuntu-latest' | ||
run: yarn build:linux | ||
|
||
- name: Upload artifact for Windows | ||
if: matrix.os == 'windows-latest' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ExamShowboard-Windows | ||
path: dist/*.exe | ||
|
||
- name: Upload artifact for macOS | ||
if: github.event.release.prerelease == true && matrix.os == 'macos-latest' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ExamShowboard-macOS | ||
path: dist/*.dmg | ||
|
||
- name: Upload artifact for Linux | ||
if: github.event.release.prerelease == true && matrix.os == 'ubuntu-latest' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ExamShowboard-Linux | ||
path: dist/*.AppImage |