Skip to content

Commit

Permalink
修改
Browse files Browse the repository at this point in the history
  • Loading branch information
lengsukq committed Dec 21, 2023
1 parent 21097ec commit f66388a
Showing 1 changed file with 34 additions and 25 deletions.
59 changes: 34 additions & 25 deletions .github/workflows/myGitTool.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
# 此工作流的名字
name: Build
# 工作流的执行时机,可以设定为定时执行,每次push后执行,手动执行等
name: Build and Release

on:
# workflow_dispatch为在Github仓库的Actions面板中手动执行
workflow_dispatch:
# 工作/任务,这里的工作是可以并行的。
push:
branches:
- main

jobs:
# 工作的名称“编译windows版”
buildwin:
# 运行的操作系统 windows server 2022
build:
runs-on: windows-latest
# 步骤

steps:
# 使用预制action:拉取最新的代码
- uses: actions/checkout@v2
# 步骤一的名称:
- name: Install and Build
# 该步骤运行的终端命令,进入仓库的src目录,安装依赖,运行编译命令
run:
yarn install && yarn build:win
# 步骤二的名称:将编译后的结果上传
- name: Upload File
# 使用预制action:上传文件,可以将执行路径打包成zip上传
uses: actions/upload-artifact@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
# 上传后文件的名称
name: windows
# 打包的路径以及文件过滤,此为仅打包dist目录下的exe文件
path: dist/*exe
node-version: '14'

- name: Install dependencies
run: |
yarn install
- name: Build Electron app for Windows
run: |
yarn build # 替换成你的构建命令
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v1.0.0
release_name: Release v1.0.0
body: Release description goes here
draft: false
prerelease: false

0 comments on commit f66388a

Please sign in to comment.