Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoLinXiaoZhu authored Aug 26, 2024
1 parent 6ef96d6 commit 63db3cc
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,39 @@ on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

build-and-release-on-windows:
runs-on: windows-latest
steps:

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v2
with:
node-version: 16 # 或者你所需的Node.js版本
node-version: '14'

- name: Install dependencies
run: npm ci
run: npm install

- name: Build and Package the app
- name: Build
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
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: app-release
path: out/ # 更改为你的输出目录路径
files: ./dist/*.exe
tag_name: v${{ github.run_number }}
release_name: Release ${{ github.run_number }}
body: |
Changes in this Release:
- Add new feature
- Fix some bugs
- Improve performance
- name: Get the URL of the release
run: echo "The release is at ${{ steps.create_release.outputs.upload_url }}"

0 comments on commit 63db3cc

Please sign in to comment.