Create build.yml #24
This file contains hidden or 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 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/ | |
| # 如果你有多个目录或文件,也可以多次上传 |