From 7ef0c670f4f0cd24130b5b040d1edc6fecebf354 Mon Sep 17 00:00:00 2001 From: simplxs Date: Tue, 2 Jul 2024 15:43:05 +0800 Subject: [PATCH] bump version fix linux fix release fix release fix release fxxk download-artifact --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 35 +++++++++++++++++------------------ CHANGELOG.md | 4 ++-- src/main.cpp | 22 ++++++++++++++++------ 4 files changed, 36 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 458585d..5431709 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ name: build on: push: branches: - - main + - main pull_request: workflow_dispatch: workflow_call: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37e2cc3..12b4cbe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ name: "release" on: push: tags: - - "v*" + - "*" permissions: write-all @@ -15,22 +15,21 @@ jobs: release: runs-on: ubuntu-latest - needs: build + needs: + - build steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Download All Artifact - uses: actions/download-artifact@v4 - - - name: Create Release Draft and Upload Artifacts - uses: softprops/action-gh-release@v2 - with: - name: SignerServer V${{ env.VERSION }} - token: ${{ secrets.GITHUB_TOKEN }} - body_path: CHANGELOG.md - files: | - SignerServer-windows-latest-x64.zip - SignerServer-ubuntu-latest-x64.zip - SignerServer-ubuntu-latest-arm64.zip - draft: true + - name: Download All Artifact + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Create Release Draft and Upload Artifacts + uses: softprops/action-gh-release@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + body_path: CHANGELOG.md + files: | + artifacts/*/* diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bf9863..a7ac34f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ -# v1.0.0 +# v2.0.0 -QQ Version: Windows 9.9.9-23424 / Linux 3.2.7-23361 +QQ Version: Windows 9.9.11-24815 / Linux 3.2.9-24815 ## 提高系统的稳定性 diff --git a/src/main.cpp b/src/main.cpp index 5ff0b0d..344864c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,7 +12,7 @@ void init() try { #if defined(_WIN_PLATFORM_) - std::string version = "9.9.12-25234"; + std::string version = "9.9.12-25300"; try { std::ifstream versionConfig("resources\\app\\versions\\config.json"); @@ -123,6 +123,15 @@ void init() } } +void uninit() +{ + if (server != nullptr) + { + delete server; + server = nullptr; + } +} + #if defined(_WIN_PLATFORM_) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) { @@ -136,11 +145,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) case DLL_THREAD_DETACH: break; case DLL_PROCESS_DETACH: - if (server != nullptr) - { - delete server; - server = nullptr; - } + uninit(); break; } return TRUE; @@ -150,4 +155,9 @@ void __attribute__((constructor)) my_init(void) { init(); } + +void __attribute__ ((destructor)) my_fini(void) +{ + uninit(); +} #endif \ No newline at end of file