File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : cmake-release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ env :
9+ # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
10+ BUILD_TYPE : Release
11+
12+ jobs :
13+ build :
14+ # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
15+ # You can convert this to a matrix build if you need cross-platform coverage.
16+ # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - uses : actions/checkout@v2
21+
22+ - name : Configure CMake
23+ # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
24+ # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
25+ run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
26+
27+ - name : Build
28+ # Build your program with the given configuration
29+ run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
30+
31+ - name : Test
32+ working-directory : ${{github.workspace}}/build
33+ # Execute tests defined by the CMake configuration.
34+ # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
35+ run : ctest -C ${{env.BUILD_TYPE}}
36+
37+ - name : Upload binaries to release
38+ uses : svenstaro/upload-release-action@v2
39+ with :
40+ repo_token : ${{ secrets.GITHUB_TOKEN }}
41+ file : ${{github.workspace}}/build/table-printer
42+ asset_name : table-printer
43+ tag : ${{ github.ref }}
44+ overwrite : true
45+ body : " Automatic binary release"
You can’t perform that action at this time.
0 commit comments