diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b251e02..ac6d7ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -127,12 +127,51 @@ jobs: run: | npx electron-builder --publish always + release-windows-arm64: + runs-on: windows-latest + + steps: + - name: Check out git repository + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Install Node.js + uses: actions/setup-node@v5 + with: + node-version: 24 + cache: 'npm' + + - name: Install Dependencies + run: npm install + + - name: Sync version with tag + shell: bash + run: | + VERSION=${GITHUB_REF_NAME#v} + echo "Syncing package.json version to $VERSION" + npm version $VERSION --no-git-tag-version --allow-same-version + + - name: Build Frontend & Type Check + run: | + npx tsc + npx vite build + + - name: Package and Publish Windows arm64 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + WF_SIGN_PRIVATE_KEY: ${{ secrets.WF_SIGN_PRIVATE_KEY }} + WF_SIGNING_REQUIRED: "1" + run: | + npx electron-builder --win nsis --arm64 --publish always + update-release-notes: runs-on: ubuntu-latest needs: - release-mac-arm64 - release-linux - release + - release-windows-arm64 steps: - name: Generate release notes with platform download links @@ -154,6 +193,7 @@ jobs: } WINDOWS_ASSET="$(pick_asset "\\.exe$")" + WINDOWS_ARM64_ASSET="$(echo "$ASSETS_JSON" | jq -r '[.assets[].name | select(test("arm64.*\\.exe$"))][0] // ""')" MAC_ASSET="$(pick_asset "\\.dmg$")" LINUX_DEB_ASSET="$(pick_asset "\\.deb$")" LINUX_TAR_ASSET="$(pick_asset "\\.tar\\.gz$")" @@ -167,6 +207,7 @@ jobs: } WINDOWS_URL="$(build_link "$WINDOWS_ASSET")" + WINDOWS_ARM64_URL="$(build_link "$WINDOWS_ARM64_ASSET")" MAC_URL="$(build_link "$MAC_ASSET")" LINUX_DEB_URL="$(build_link "$LINUX_DEB_ASSET")" LINUX_TAR_URL="$(build_link "$LINUX_TAR_ASSET")" @@ -180,7 +221,8 @@ jobs: [点击加入 Telegram 频道](https://t.me/weflow_cc) ## 下载 - - Windows (Win10+): ${WINDOWS_URL:-$RELEASE_PAGE} + - Windows x64(Win10+): ${WINDOWS_URL:-$RELEASE_PAGE} + - Windows arm64: ${WINDOWS_ARM64_URL:-$RELEASE_PAGE} - macOS(M系列芯片): ${MAC_URL:-$RELEASE_PAGE} - Linux (.deb) (即将废弃): ${LINUX_DEB_URL:-$RELEASE_PAGE} - Linux (.tar.gz): ${LINUX_TAR_URL:-$RELEASE_PAGE} diff --git a/electron/services/wcdbCore.ts b/electron/services/wcdbCore.ts index 5bb6b47..49fed8b 100644 --- a/electron/services/wcdbCore.ts +++ b/electron/services/wcdbCore.ts @@ -266,8 +266,9 @@ export class WcdbCore { private getDllPath(): string { const isMac = process.platform === 'darwin' const isLinux = process.platform === 'linux' + const isArm64 = process.arch === 'arm64' const libName = isMac ? 'libwcdb_api.dylib' : isLinux ? 'libwcdb_api.so' : 'wcdb_api.dll' - const subDir = isMac ? 'macos' : isLinux ? 'linux' : '' + const subDir = isMac ? 'macos' : isLinux ? 'linux' : (isArm64 ? 'arm64' : '') const envDllPath = process.env.WCDB_DLL_PATH if (envDllPath && envDllPath.length > 0) { diff --git a/resources/arm64/WCDB.dll b/resources/arm64/WCDB.dll new file mode 100644 index 0000000..60c3508 Binary files /dev/null and b/resources/arm64/WCDB.dll differ diff --git a/resources/arm64/wcdb_api.dll b/resources/arm64/wcdb_api.dll new file mode 100644 index 0000000..3f80b52 Binary files /dev/null and b/resources/arm64/wcdb_api.dll differ