initial commit
CMake Build / build (push) Successful in 23s

This commit is contained in:
2025-03-22 11:03:07 +08:00
parent 1f9747beb1
commit 48a1faf868
4 changed files with 47 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
name: CMake Build
on:
push:
tags:
- "v*"
jobs:
build:
# 可以更换为ubuntu-{24.04, 22.04, 20.04},默认为ubuntu-24.04
runs-on: ubuntu-24.04
steps:
- name: Install Dependencies
run: |
apt update
apt install -y cmake build-essential
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
- name: Build Project
run: cmake --build ${{github.workspace}}/build --config Release --parallel 8
- name: Strip Binary
run: strip ${{github.workspace}}/build/cpp_example
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: ${{github.workspace}}/build/cpp_example
draft: false
prerelease: false
generate_release_notes: true
token: ${{secrets.GITHUB_TOKEN}}