enhance: improve updater workflow with latest.json collection and prerelease flag

This commit is contained in:
Jason
2025-09-09 21:14:44 +08:00
parent 41f3aa7d76
commit f99b614888
2 changed files with 12 additions and 1 deletions

View File

@@ -222,12 +222,23 @@ jobs:
done
echo "Collected signatures:"
ls -la release-assets/*.sig || echo "No signatures found"
# 查找并复制 latest.jsonupdater manifest到 release-assets
FOUND_JSON=false
while IFS= read -r json; do
cp "$json" release-assets/ || true
echo "Copied updater manifest: $json"
FOUND_JSON=true
done < <(find src-tauri/target -name "latest.json" -type f 2>/dev/null)
if [ "$FOUND_JSON" = false ]; then
echo "Warning: latest.json not found under src-tauri/target" >&2
fi
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: CC Switch ${{ github.ref_name }}
prerelease: true
body: |
## CC Switch ${{ github.ref_name }}

View File

@@ -42,7 +42,7 @@
,
"plugins": {
"updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDg4NEM4NUExRUVDMDdFMkIKUldRcmZzRHVvWVZNaUFaVElYbXh5c0QxT1RNaFZ6ZWlydlEyeFU3OG1odm9iTXRoc1FhUXlyM20K",
"pubkey": "RWQrfsDuoYVMiAZTIXmxysD1OTMhVzeirvQ2xU78mhvobMthsQaQyr3m",
"endpoints": [
"https://github.com/jasonyoung/cc-switch/releases/latest/download/latest.json"
]