-
Notifications
You must be signed in to change notification settings - Fork 0
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
a921c32
commit a9e5966
Showing
1 changed file
with
45 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,45 @@ | ||
name: Electron Builds | ||
|
||
on: | ||
push: | ||
branches: | ||
- master # 可以更改为你的默认分支 | ||
|
||
jobs: | ||
build: | ||
name: Build on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Run Package | ||
run: npm run package | ||
|
||
- name: Run Make | ||
run: npm run make | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.os }}-app | ||
path: ./out/make/* | ||
|
||
- name: Release to GitHub | ||
uses: "gh-actions/gh-release@v1.1.0" | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
assets: ./out/make/* # 请替换为你的应用打包后的路径 | ||
continue-on-error: true |