mirror of
https://github.com/Simplxss/SignerServer.git
synced 2024-11-21 00:37:53 +08:00
add release
This commit is contained in:
parent
1a0d28b514
commit
b12c2206b8
154
.github/workflows/build.yml
vendored
154
.github/workflows/build.yml
vendored
@ -1,93 +1,93 @@
|
|||||||
# https://docs.github.com/en/actions/learn-github-actions/contexts
|
# https://docs.github.com/en/actions/learn-github-actions/contexts
|
||||||
|
|
||||||
---
|
name: SignerServer
|
||||||
name: SignerServer
|
on:
|
||||||
on:
|
push:
|
||||||
push:
|
branches:
|
||||||
branches:
|
- main
|
||||||
- main
|
pull_request:
|
||||||
pull_request:
|
workflow_dispatch:
|
||||||
workflow_dispatch:
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
windows:
|
windows:
|
||||||
name: run on ${{ matrix.os }}(${{ matrix.arch }})
|
name: run on ${{ matrix.os }}(${{ matrix.arch }})
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest]
|
os: [windows-latest]
|
||||||
arch: [x64]
|
arch: [x64]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup cmake
|
- name: Setup cmake
|
||||||
uses: lukka/get-cmake@latest
|
uses: lukka/get-cmake@latest
|
||||||
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
uses: lukka/run-cmake@v10
|
uses: lukka/run-cmake@v10
|
||||||
with:
|
with:
|
||||||
# This is the default path to the CMakeLists.txt along side the
|
# This is the default path to the CMakeLists.txt along side the
|
||||||
# CMakePresets.json. Change if you need have CMakeLists.txt and CMakePresets.json
|
# CMakePresets.json. Change if you need have CMakeLists.txt and CMakePresets.json
|
||||||
# located elsewhere.
|
# located elsewhere.
|
||||||
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
|
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
|
||||||
|
|
||||||
# This is the name of the CMakePresets.json's configuration to use to generate
|
# This is the name of the CMakePresets.json's configuration to use to generate
|
||||||
# the project files. This configuration leverages the vcpkg.cmake toolchain file to
|
# the project files. This configuration leverages the vcpkg.cmake toolchain file to
|
||||||
# run vcpkg and install all dependencies specified in vcpkg.json.
|
# run vcpkg and install all dependencies specified in vcpkg.json.
|
||||||
configurePreset: 'msvc-${{ matrix.arch }}'
|
configurePreset: 'msvc-${{ matrix.arch }}'
|
||||||
|
|
||||||
# This is the name of the CMakePresets.json's configuration to build the project.
|
# This is the name of the CMakePresets.json's configuration to build the project.
|
||||||
buildPreset: 'msvc-${{ matrix.arch }}-release'
|
buildPreset: 'msvc-${{ matrix.arch }}-release'
|
||||||
|
|
||||||
- run: mv build/msvc-${{ matrix.arch }}/Release/SignerServer.dll SignerServer.dll
|
- run: mv build/msvc-${{ matrix.arch }}/Release/SignerServer.dll SignerServer.dll
|
||||||
|
|
||||||
- name: Upload build
|
- name: Upload build
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: SignerServer-${{ matrix.os }}-${{ matrix.arch }}
|
name: SignerServer-${{ matrix.os }}-${{ matrix.arch }}
|
||||||
path: |
|
path: |
|
||||||
SignerServer.dll
|
SignerServer.dll
|
||||||
load.js
|
load.js
|
||||||
start.sh
|
start.sh
|
||||||
|
|
||||||
ubuntu:
|
ubuntu:
|
||||||
name: run on ${{ matrix.os }}(${{ matrix.arch }})
|
name: run on ${{ matrix.os }}(${{ matrix.arch }})
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
arch: [x64, arm64]
|
arch: [x64, arm64]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup cmake
|
- name: Setup cmake
|
||||||
uses: lukka/get-cmake@latest
|
uses: lukka/get-cmake@latest
|
||||||
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
uses: lukka/run-cmake@v10
|
uses: lukka/run-cmake@v10
|
||||||
with:
|
with:
|
||||||
# This is the default path to the CMakeLists.txt along side the
|
# This is the default path to the CMakeLists.txt along side the
|
||||||
# CMakePresets.json. Change if you need have CMakeLists.txt and CMakePresets.json
|
# CMakePresets.json. Change if you need have CMakeLists.txt and CMakePresets.json
|
||||||
# located elsewhere.
|
# located elsewhere.
|
||||||
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
|
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
|
||||||
|
|
||||||
# This is the name of the CMakePresets.json's configuration to use to generate
|
# This is the name of the CMakePresets.json's configuration to use to generate
|
||||||
# the project files. This configuration leverages the vcpkg.cmake toolchain file to
|
# the project files. This configuration leverages the vcpkg.cmake toolchain file to
|
||||||
# run vcpkg and install all dependencies specified in vcpkg.json.
|
# run vcpkg and install all dependencies specified in vcpkg.json.
|
||||||
configurePreset: 'ninja'
|
configurePreset: 'ninja'
|
||||||
|
|
||||||
# This is the name of the CMakePresets.json's configuration to build the project.
|
# This is the name of the CMakePresets.json's configuration to build the project.
|
||||||
buildPreset: 'ninja-release'
|
buildPreset: 'ninja-release'
|
||||||
|
|
||||||
- run: mv build/ninja/libSignerServer.so libSignerServer.so
|
- run: mv build/ninja/libSignerServer.so libSignerServer.so
|
||||||
|
|
||||||
- name: Upload build
|
- name: Upload build
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: SignerServer-${{ matrix.os }}-${{ matrix.arch }}
|
name: SignerServer-${{ matrix.os }}-${{ matrix.arch }}
|
||||||
path: |
|
path: |
|
||||||
libSignerServer.so
|
libSignerServer.so
|
||||||
load.js
|
load.js
|
||||||
start.sh
|
start.sh
|
||||||
|
12
.github/workflows/docker-publish.yml
vendored
12
.github/workflows/docker-publish.yml
vendored
@ -1,8 +1,14 @@
|
|||||||
|
# https://docs.github.com/en/actions/learn-github-actions/contexts
|
||||||
|
|
||||||
name: docker-publish
|
name: docker-publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
DOCKER_REPO: simplxs/signerserver
|
||||||
|
GITHUB_REPO: Simplxss/SignerServer
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-dockerhub:
|
publish-dockerhub:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -21,11 +27,8 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
# Fork from https://github.com/koishijs/boilerplate/blob/master/.github/workflows/docker.yml
|
# Fork from https://github.com/koishijs/boilerplate/blob/master/.github/workflows/docker.yml
|
||||||
- name: Run buildx and push
|
- name: Run buildx and push
|
||||||
env:
|
|
||||||
DOCKER_REPO: mlikiowa/napcat-docker
|
|
||||||
GITHUB_REPO: NapNeko/NapCatQQ
|
|
||||||
run: |
|
run: |
|
||||||
TAG=$(curl "https://api.github.com/repos/NapNeko/NapCatQQ/releases/latest" | jq -r '.tag_name')
|
TAG=$(curl "https://api.github.com/repos/${GITHUB_REPO}/releases/latest" | jq -r '.tag_name')
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--output "type=image,push=true" \
|
--output "type=image,push=true" \
|
||||||
--platform linux/amd64,linux/arm64 \
|
--platform linux/amd64,linux/arm64 \
|
||||||
@ -34,5 +37,4 @@ jobs:
|
|||||||
--file ./Dockerfile \
|
--file ./Dockerfile \
|
||||||
.
|
.
|
||||||
- name: Docker Hub logout
|
- name: Docker Hub logout
|
||||||
if: always()
|
|
||||||
run: docker logout
|
run: docker logout
|
36
.github/workflows/release.yml
vendored
Normal file
36
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# https://docs.github.com/en/actions/learn-github-actions/contexts
|
||||||
|
|
||||||
|
name: "release"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
permissions: write-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
uses: ./.github/workflows/build.yml
|
||||||
|
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- 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@v1
|
||||||
|
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
|
8
CHANGELOG.md
Normal file
8
CHANGELOG.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# v1.0.0
|
||||||
|
|
||||||
|
QQ Version: Windows 9.9.9-23424 / Linux 3.2.7-23361
|
||||||
|
|
||||||
|
## 提高系统的稳定性
|
||||||
|
|
||||||
|
|
||||||
|
## 优化系统的流畅度
|
@ -16,6 +16,13 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
|||||||
add_definitions(-D _LINUX_PLATFORM_)
|
add_definitions(-D _LINUX_PLATFORM_)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "IA64")
|
||||||
|
add_definitions(-D _X64_ARCH_)
|
||||||
|
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
|
||||||
|
add_definitions(-D _X86_ARCH_)
|
||||||
|
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||||
|
add_definitions(-D _ARM64_ARCH_)
|
||||||
|
endif()
|
||||||
|
|
||||||
file(GLOB SOURCE_FILES "./src/*.cpp" "./src/*.asm")
|
file(GLOB SOURCE_FILES "./src/*.cpp" "./src/*.asm")
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// #define _LINUX_PLATFORM_
|
// #define _LINUX_PLATFORM_
|
||||||
// #define _WIN_PLATFORM_
|
// #define _WIN_PLATFORM_
|
||||||
|
|
||||||
#define _X64_ARCH_
|
// #define _X64_ARCH_
|
||||||
|
|
||||||
#if defined(_WIN_PLATFORM_)
|
#if defined(_WIN_PLATFORM_)
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
@ -50,6 +50,9 @@ std::map<std::string, uint64_t> addrMap = {
|
|||||||
{"3.1.2-12912", 0x33C38E0},
|
{"3.1.2-12912", 0x33C38E0},
|
||||||
{"3.1.2-13107", 0x33C3920},
|
{"3.1.2-13107", 0x33C3920},
|
||||||
{"3.2.7-23361", 0x4C93C57}};
|
{"3.2.7-23361", 0x4C93C57}};
|
||||||
|
#elif defined(_ARM64_ARCH_)
|
||||||
|
std::map<std::string, uint64_t> addrMap = {
|
||||||
|
{"3.2.7-23361", 0x4C93C57}};
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user