From 58a3f0053e0bbdfa8a4a2a337ec1abfbe23f762c Mon Sep 17 00:00:00 2001 From: hatelamers <97636078+hatelamers@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:48:35 +0100 Subject: [PATCH] #2 updated publish workflow, fixed minor errors in CMake scripts --- .github/workflows/cmake-publish.yml | 5 ++--- buildenv/Product.cmake | 2 +- buildenv/cmake/PostBuild.cmake | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake-publish.yml b/.github/workflows/cmake-publish.yml index afa97d0..2ee37be 100644 --- a/.github/workflows/cmake-publish.yml +++ b/.github/workflows/cmake-publish.yml @@ -45,7 +45,7 @@ jobs: env: CODESIGN_PW: ${{ secrets.CODESIGN_PW }} - name: Publish to GitHub - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: files: | distr/*.exe @@ -57,5 +57,4 @@ jobs: if: always() continue-on-error: true run: | - del /q "$env:TEMP\signcert.txt" 2>nul - del /q "$env:TEMP\signcert.pfx" 2>nul + del "$env:TEMP\signcert.*" diff --git a/buildenv/Product.cmake b/buildenv/Product.cmake index f943973..4e46e9b 100644 --- a/buildenv/Product.cmake +++ b/buildenv/Product.cmake @@ -10,5 +10,5 @@ set(PRODUCT_HOMEPAGE_URL "https://github.com/hatelamers/WinPinMenu") set(PROJECT_LICENSE "GNU/GPL") set(PROJECT_LICENSE_URL "https://www.gnu.org/licenses/gpl-3.0.en.html") set(PROJECT_COPYRIGHT "© 2024, some rights reserved") -string(TOLOWER "${PROJECT_NAME}" PRODUCT_IDENTIFIER) +string(TOLOWER "${PRODUCT_NAME}" PRODUCT_IDENTIFIER) set(PACKAGE_IDENTIFIER "net.jasics.${PRODUCT_IDENTIFIER}") diff --git a/buildenv/cmake/PostBuild.cmake b/buildenv/cmake/PostBuild.cmake index d8bf85a..2df38c1 100644 --- a/buildenv/cmake/PostBuild.cmake +++ b/buildenv/cmake/PostBuild.cmake @@ -1,11 +1,9 @@ if(NOT ${BUILD_TYPE} MATCHES Debug) + include("${SOURCE_DIR}/Product.cmake") file(READ "${SOURCE_DIR}/buildnumber.txt" BUILD_NUMBER) if(NOT ${BUILD_NUMBER}) set(BUILD_NUMBER 1) endif() - include("${SOURCE_DIR}/Product.cmake") - file(REMOVE "${MAIN_TARGET_SOURCE_DIR}/productmeta.h") - configure_file("${MAIN_TARGET_SOURCE_DIR}/productmeta.h.in" "${MAIN_TARGET_SOURCE_DIR}/productmeta.h") math(EXPR BUILD_NUMBER "${BUILD_NUMBER} + 1") if(${CMAKE_VERSION} VERSION_LESS 3.18) @@ -13,6 +11,8 @@ if(NOT ${BUILD_TYPE} MATCHES Debug) else() file(CONFIGURE OUTPUT "${SOURCE_DIR}/buildnumber.txt" CONTENT "${BUILD_NUMBER}") endif() + file(REMOVE "${MAIN_TARGET_SOURCE_DIR}/productmeta.h") + configure_file("${MAIN_TARGET_SOURCE_DIR}/productmeta.h.in" "${MAIN_TARGET_SOURCE_DIR}/productmeta.h") file(TOUCH_NOCREATE "${MAIN_TARGET_SOURCE_DIR}/${MAIN_TARGET_NAME}.rc") message(STATUS "Build number set to ${BUILD_NUMBER} in ${SOURCE_DIR}/buildnumber.txt")