add release

This commit is contained in:
Simplxs 2024-05-10 19:10:07 +08:00
parent 1a0d28b514
commit b12c2206b8
6 changed files with 143 additions and 87 deletions

View File

@ -1,6 +1,5 @@
# 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:
@ -8,6 +7,7 @@
- main - main
pull_request: pull_request:
workflow_dispatch: workflow_dispatch:
workflow_call:
jobs: jobs:
windows: windows:

View File

@ -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
View 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
View File

@ -0,0 +1,8 @@
# v1.0.0
QQ Version: Windows 9.9.9-23424 / Linux 3.2.7-23361
## 提高系统的稳定性
## 优化系统的流畅度

View File

@ -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")

View File

@ -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