build(tool): 添加Windows上传工具构建工作流
This commit is contained in:
29
.gitea/workflows/build_tool.yaml
Normal file
29
.gitea/workflows/build_tool.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
name: 构建上传工具
|
||||||
|
on: [ push ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: 检出代码
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: 安装Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version-file: "go.mod"
|
||||||
|
|
||||||
|
- name: 构建上传工具
|
||||||
|
run: |
|
||||||
|
go env -w CGO_ENABLED=0 \
|
||||||
|
&& go env -w GOARCH=amd64 \
|
||||||
|
&& go env -w GOOS=windows \
|
||||||
|
&& go mod tidy \
|
||||||
|
&& cd ./tool
|
||||||
|
&& go build -o 上传工具.exe
|
||||||
|
|
||||||
|
- name: 上传构建文件
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: 上传工具
|
||||||
|
path: tool/上传工具.exe
|
Reference in New Issue
Block a user