feat: add auto-updater support with GitHub releases
- Configure Tauri updater plugin with Ed25519 signing - Add GitHub Actions support for signed builds - Set up GitHub releases as update endpoint - Enable update checking in Settings modal
This commit is contained in:
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
@@ -85,14 +85,20 @@ jobs:
|
||||
|
||||
- name: Build Tauri App (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
env:
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
run: pnpm tauri build --target universal-apple-darwin
|
||||
|
||||
- name: Build Tauri App (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
env:
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
run: pnpm tauri build
|
||||
|
||||
- name: Build Tauri App (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
env:
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
run: pnpm tauri build
|
||||
|
||||
- name: Prepare macOS Assets
|
||||
@@ -180,6 +186,16 @@ jobs:
|
||||
run: |
|
||||
ls -la release-assets || true
|
||||
|
||||
- name: Collect Signatures
|
||||
shell: bash
|
||||
run: |
|
||||
# 查找并复制签名文件到 release-assets
|
||||
find src-tauri/target -name "*.sig" -type f 2>/dev/null | while read sig; do
|
||||
cp "$sig" release-assets/ || true
|
||||
done
|
||||
echo "Collected signatures:"
|
||||
ls -la release-assets/*.sig || echo "No signatures found"
|
||||
|
||||
- name: Upload Release Assets
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
|
||||
@@ -43,7 +43,9 @@
|
||||
"plugins": {
|
||||
"updater": {
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDRERTRCNEUxQUE3MDA4QTYKUldTbUNIQ3E0YlRrVFF2cnFVVE1jczlNZFlmemxXd0h6cTdibXRJWjBDSytQODdZOTYvR3d3d2oK",
|
||||
"endpoints":["http://127.0.0.1:8080/latest.json"]
|
||||
"endpoints": [
|
||||
"https://github.com/jasonyoung/cc-switch/releases/latest/download/latest.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user