-
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
Showing
3 changed files
with
35 additions
and
2 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,28 @@ | ||
name: Electron App Release Workflow | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: windows-2022 # 或选择其他适合你项目的操作系统环境 | ||
env: | ||
GITHUB_TOKEN: ${{ vars.REPO_NOEXPIRATION }} | ||
ELECTRON_MIRROR: https://npmmirror.com/mirrors/electron/ | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
|
||
- name: Install Node.js and npm | ||
uses: actions/[email protected] | ||
with: | ||
node-version: "18.18.1" # 使用与你的项目兼容的Node.js版本 | ||
|
||
- name: Install dependencies and rebuild native modules for Electron | ||
run: npm ci | ||
|
||
- name: Publish to GitHub Release using electron-builder | ||
run: npm run publish # 这个命令将在本地运行electron-builder的发布流程,包括构建和发布到GitHub |
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
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