Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 29 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,33 @@ env:

jobs:
build-windows:
name: build-windows(${{ matrix.arch }})
if: github.event.inputs.platform == 'all' || contains(github.event.inputs.platform, 'windows')
runs-on: windows-latest
runs-on: ${{ matrix.runner }}
strategy:
matrix:
arch: [x64]
include:
- arch: x64
platform: win-x64
runner: windows-2025-vs2026
unpacked: win-unpacked
- arch: arm64
platform: win-arm64
runner: windows-11-arm
unpacked: win-arm64-unpacked
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24.14.1'
package-manager-cache: false

- name: Setup pnpm
uses: pnpm/action-setup@v6
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

- name: Install dependencies
run: pnpm install
Expand All @@ -58,11 +66,12 @@ jobs:
npm_config_arch: ${{ matrix.arch }}

- name: Report RTK install token source
if: matrix.arch == 'x64'
shell: bash
run: |
echo "RTK runtime install token source: ${RTK_INSTALL_GITHUB_TOKEN_SOURCE}"

- name: Install Node Runtime
- name: Install Windows runtimes
run: pnpm run installRuntime:win:${{ matrix.arch }}
env:
GITHUB_TOKEN: ${{ env.RTK_INSTALL_GITHUB_TOKEN }}
Expand All @@ -81,10 +90,10 @@ jobs:
- name: Verify bundled plugins
shell: bash
run: |
pnpm run plugin:verify -- --name feishu --platform win32 --arch ${{ matrix.arch }} --plugin-root dist/win-unpacked/resources/app.asar.unpacked/plugins
pnpm run plugin:verify -- --name feishu --platform win32 --arch ${{ matrix.arch }} --plugin-root dist/${{ matrix.unpacked }}/resources/app.asar.unpacked/plugins

- name: Upload artifacts
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: deepchat-${{ matrix.platform }}
path: |
Expand All @@ -102,16 +111,18 @@ jobs:
- arch: x64
platform: linux-x64
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24.14.1'
package-manager-cache: false

- name: Setup pnpm
uses: pnpm/action-setup@v6
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

- name: Install dependencies
run: pnpm install
Expand Down Expand Up @@ -145,7 +156,7 @@ jobs:
pnpm run plugin:verify -- --name feishu --platform linux --arch ${{ matrix.arch }} --plugin-root dist/linux-unpacked/resources/app.asar.unpacked/plugins

- name: Upload artifacts
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: deepchat-${{ matrix.platform }}
path: |
Expand All @@ -164,16 +175,18 @@ jobs:
- arch: arm64
platform: mac-arm64
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24.14.1'
package-manager-cache: false

- name: Setup pnpm
uses: pnpm/action-setup@v6
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

- name: Install dependencies
run: pnpm install
Expand Down Expand Up @@ -231,7 +244,7 @@ jobs:
pnpm run plugin:verify -- --name feishu --platform darwin --arch "$TARGET_ARCH" --plugin-root "$PLUGIN_ROOT"

- name: Upload artifacts
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: deepchat-${{ matrix.platform }}
path: |
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/prcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ jobs:
exit 1
fi

- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

Expand All @@ -46,16 +47,18 @@ jobs:
include:
- arch: x64
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24.14.1'
package-manager-cache: false

- name: Setup pnpm
uses: pnpm/action-setup@v6
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

- name: Install dependencies
run: pnpm install
Expand Down
89 changes: 69 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- name: Resolve tag
id: resolve
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
const isDispatch = context.eventName === 'workflow_dispatch'
Expand Down Expand Up @@ -97,8 +97,9 @@ jobs:
needs: resolve-tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
ref: ${{ needs.resolve-tag.outputs.sha }}
fetch-depth: 0

Expand All @@ -113,28 +114,35 @@ jobs:
fi

build-windows:
name: build-windows(${{ matrix.arch }})
needs: [resolve-tag, validate-main-ancestor]
runs-on: windows-latest
runs-on: ${{ matrix.runner }}
strategy:
matrix:
arch: [x64]
include:
- arch: x64
platform: win-x64
runner: windows-2025-vs2026
unpacked: win-unpacked
- arch: arm64
platform: win-arm64
runner: windows-11-arm
unpacked: win-arm64-unpacked
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
ref: ${{ needs.resolve-tag.outputs.sha }}
fetch-depth: 1

- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24.14.1'
package-manager-cache: false

- name: Setup pnpm
uses: pnpm/action-setup@v6
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

- name: Install dependencies
run: pnpm install
Expand Down Expand Up @@ -177,10 +185,10 @@ jobs:
- name: Verify bundled plugins
shell: bash
run: |
pnpm run plugin:verify -- --name feishu --platform win32 --arch ${{ matrix.arch }} --plugin-root dist/win-unpacked/resources/app.asar.unpacked/plugins
pnpm run plugin:verify -- --name feishu --platform win32 --arch ${{ matrix.arch }} --plugin-root dist/${{ matrix.unpacked }}/resources/app.asar.unpacked/plugins

- name: Upload artifacts
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: deepchat-${{ matrix.platform }}
path: |
Expand All @@ -198,19 +206,20 @@ jobs:
- arch: x64
platform: linux-x64
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
ref: ${{ needs.resolve-tag.outputs.sha }}
fetch-depth: 1

- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24.14.1'
package-manager-cache: false

- name: Setup pnpm
uses: pnpm/action-setup@v6
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

- name: Install dependencies
run: pnpm install
Expand Down Expand Up @@ -242,7 +251,7 @@ jobs:
pnpm run plugin:verify -- --name feishu --platform linux --arch ${{ matrix.arch }} --plugin-root dist/linux-unpacked/resources/app.asar.unpacked/plugins

- name: Upload artifacts
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: deepchat-${{ matrix.platform }}
path: |
Expand All @@ -261,19 +270,20 @@ jobs:
- arch: arm64
platform: mac-arm64
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
ref: ${{ needs.resolve-tag.outputs.sha }}
fetch-depth: 1

- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24.14.1'
package-manager-cache: false

- name: Setup pnpm
uses: pnpm/action-setup@v6
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

- name: Install dependencies
run: pnpm install
Expand Down Expand Up @@ -332,7 +342,7 @@ jobs:
pnpm run plugin:verify -- --name feishu --platform darwin --arch "$TARGET_ARCH" --plugin-root "$PLUGIN_ROOT"

- name: Upload artifacts
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: deepchat-${{ matrix.platform }}
path: |
Expand All @@ -348,8 +358,9 @@ jobs:
- build-mac
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
ref: ${{ needs.resolve-tag.outputs.sha }}
fetch-depth: 1

Expand Down Expand Up @@ -395,7 +406,7 @@ jobs:
fi

- name: Download build artifacts
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: artifacts

Expand All @@ -412,6 +423,44 @@ jobs:
cp artifacts/deepchat-win-x64/*.blockmap release_assets/ 2>/dev/null || true
fi

# Process Windows arm64 artifacts
if [ -d "artifacts/deepchat-win-arm64" ]; then
cp artifacts/deepchat-win-arm64/*.exe release_assets/ 2>/dev/null || true
cp artifacts/deepchat-win-arm64/*.msi release_assets/ 2>/dev/null || true
cp artifacts/deepchat-win-arm64/*.zip release_assets/ 2>/dev/null || true
cp artifacts/deepchat-win-arm64/*.blockmap release_assets/ 2>/dev/null || true
fi

merge_windows_yml() {
local name="$1"
local x64="artifacts/deepchat-win-x64/$name"
local arm64="artifacts/deepchat-win-arm64/$name"
if [ -f "$x64" ] && [ -f "$arm64" ]; then
ruby -ryaml -e '
x64 = YAML.load_file(ARGV[0]) || {}
arm = YAML.load_file(ARGV[1]) || {}
merged = x64.dup
merged["version"] ||= arm["version"]
merged["releaseDate"] ||= arm["releaseDate"]
merged["releaseNotes"] ||= arm["releaseNotes"]
merged["path"] ||= arm["path"]
merged["sha512"] ||= arm["sha512"]
files = []
files.concat(x64["files"]) if x64["files"].is_a?(Array)
files.concat(arm["files"]) if arm["files"].is_a?(Array)
merged["files"] = files.uniq { |f| f["url"] }
File.write(ARGV[2], merged.to_yaml)
' "$x64" "$arm64" "release_assets/$name"
elif [ -f "$x64" ]; then
cp "$x64" "release_assets/$name"
elif [ -f "$arm64" ]; then
cp "$arm64" "release_assets/$name"
fi
}

merge_windows_yml latest.yml
merge_windows_yml beta.yml

# Process Linux x64 artifacts
if [ -d "artifacts/deepchat-linux-x64" ]; then
cp artifacts/deepchat-linux-x64/*.AppImage release_assets/ 2>/dev/null || true
Expand Down Expand Up @@ -474,7 +523,7 @@ jobs:
ls -la release_assets/

- name: Create Draft Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
tag_name: ${{ needs.resolve-tag.outputs.tag }}
name: DeepChat V${{ steps.get_version.outputs.version }}
Expand Down
Loading
Loading