Skip to content

Create build.yml

Create build.yml #24

Workflow file for this run

name: Build and Upload Artifacts
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B build -S .
- name: Build
run: cmake --build build --config Release
# 上传构建产物
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-output
path: build/
# 如果只想上传特定文件,可以使用通配符,例如:
# path: build/*.exe
# 或者多个路径:
# path: |
# build/bin/
# build/lib/
# 如果你有多个目录或文件,也可以多次上传