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
name: Build and Release Electron App | |
on: | |
push: | |
branches: [ main ] # 更改为主分支的名字,如 master 或者 main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 # 或者你所需的Node.js版本 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build and Package the app | |
run: npm run make | |
env: | |
ELECTRON_GITHUB_TOKEN: ${{ secrets.ELECTRON_GITHUB_TOKEN }} | |
# 如果make脚本需要环境变量,请在这里添加它们 | |
# 例如: | |
# ELECTRON_GITHUB_TOKEN: ${{ secrets.ELECTRON_GITHUB_TOKEN }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app-release | |
path: out/ # 更改为你的输出目录路径 |