File tree Expand file tree Collapse file tree 3 files changed +37
-36
lines changed
Expand file tree Collapse file tree 3 files changed +37
-36
lines changed Original file line number Diff line number Diff line change 1+ name : create package
2+ permissions :
3+ contents : write
4+
5+ on :
6+ release :
7+ types : [published]
8+
9+ jobs :
10+ create-package :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : CMake Project Version
16+ id : cmake-project-version
17+ uses :
DarwinInnovation/[email protected] 18+
19+ - name : Create build environment
20+ run : cmake -E make_directory build
21+
22+ - name : Configure CMake
23+ run : cmake -B ./build
24+
25+ - name : Create package
26+ run : cmake --build ./build --target package
27+
28+ - name : Upload package
29+ uses : svenstaro/upload-release-action@v2
30+ with :
31+ repo_token : ${{ secrets.GITHUB_TOKEN }}
32+ file : build/${{ steps.cmake-project-version.outputs.project }}-${{ steps.cmake-project-version.outputs.version }}-src.zip
33+ tag : ${{ github.ref }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -39,11 +39,10 @@ install(FILES "cmake/traits-config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/traits-co
3939
4040# Downloadable package for fetch content
4141
42- set (package_files examples/ include / tests/ CMakeLists.txt LICENSE README.md )
4342add_custom_command (
44- OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /${PROJECT_NAME} -src.zip
45- COMMAND ${CMAKE_COMMAND} -E tar c ${CMAKE_CURRENT_BINARY_DIR} /${PROJECT_NAME} -src.zip --format=zip -- ${package_files}
43+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /${PROJECT_NAME} -${PROJECT_VERSION} -src.zip
44+ COMMAND ${CMAKE_COMMAND} -E tar c ${CMAKE_CURRENT_BINARY_DIR} /${PROJECT_NAME} -${PROJECT_VERSION} -src.zip --format=zip --
45+ cmake/ examples/ include / tests/ CMakeLists.txt LICENSE README.md
4646 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
47- DEPENDS ${package_files}
4847 )
49- add_custom_target (${PROJECT_NAME} _package DEPENDS ${CMAKE_CURRENT_BINARY_DIR} /${PROJECT_NAME} -src.zip)
48+ add_custom_target (package DEPENDS ${CMAKE_CURRENT_BINARY_DIR} /${PROJECT_NAME} - ${PROJECT_VERSION } -src.zip)
You can’t perform that action at this time.
0 commit comments