diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 217aeaa4..46c119bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,22 +126,14 @@ jobs: steps: - name: Fetch artifacts uses: actions/download-artifact@v4 - - name: Remove old release - uses: ClementTsang/delete-tag-and-release@v0.3.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: continuous - delete_release: true - repo: ${{ env.GITHUB_REPOSITORY }} - name: Prepare release run: | + gh release delete continous --cleanup-tag mv Android/app-debug-signed.apk CS16Client-Android.apk - mv */*.zip . mv */*.tar.gz . - - sleep 60s + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Purge artifacts uses: geekyeggo/delete-artifact@v2 with: diff --git a/CMakeLists.txt b/CMakeLists.txt index 05839c4c..2cd04af7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") set(EXTRAS_DIR "${CMAKE_CURRENT_BINARY_DIR}/extras") include(LibraryNaming) -# include(ExternalProject) +# include(ExternalProject option(BUILD_CLIENT "Build client library." ON) option(BUILD_MAINUI "Build menu library." ON) @@ -57,22 +57,7 @@ if(BUILD_MAINUI) add_subdirectory(3rdparty/mainui_cpp) endif() -# ugly and not performant but cmake is what it is -if(NOT ANDROID) - add_custom_command(OUTPUT ${EXTRAS_DIR} - COMMAND ${CMAKE_COMMAND} -E make_directory "${EXTRAS_DIR}") - - add_custom_target(pack_extras ALL - COMMAND ${CMAKE_COMMAND} -E copy_directory - "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/cs16client-extras" "${EXTRAS_DIR}" - COMMAND ${CMAKE_COMMAND} -E copy_directory - "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/yapb/cfg/addons" "${EXTRAS_DIR}" - COMMAND ${CMAKE_COMMAND} -E tar cf "${EXTRAS_DIR}.pk3" --format=zip . - WORKING_DIRECTORY "${EXTRAS_DIR}" - DEPENDS "${EXTRAS_DIR}") - - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/extras.pk3" DESTINATION "${GAME_DIR}/") -endif() +include(GenerateExtras) if(WIN32) set(CPACK_GENERATOR "ZIP") diff --git a/cmake/GenerateExtras.cmake b/cmake/GenerateExtras.cmake new file mode 100644 index 00000000..a1406cf2 --- /dev/null +++ b/cmake/GenerateExtras.cmake @@ -0,0 +1,16 @@ +# ugly and not performant but cmake is what it is +if(NOT ANDROID) + add_custom_command(OUTPUT ${EXTRAS_DIR} + COMMAND ${CMAKE_COMMAND} -E make_directory "${EXTRAS_DIR}") + + add_custom_target(pack_extras ALL + COMMAND ${CMAKE_COMMAND} -E copy_directory + "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/cs16client-extras" "${EXTRAS_DIR}" + COMMAND ${CMAKE_COMMAND} -E copy_directory + "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/yapb/cfg/addons" "${EXTRAS_DIR}" + COMMAND ${CMAKE_COMMAND} -E tar cf "${EXTRAS_DIR}.pk3" --format=zip . + WORKING_DIRECTORY "${EXTRAS_DIR}" + DEPENDS "${EXTRAS_DIR}") + + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/extras.pk3" DESTINATION "${GAME_DIR}/") +endif() \ No newline at end of file