enhance: improve updater workflow with latest.json collection and prerelease flag
This commit is contained in:
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
@@ -222,12 +222,23 @@ jobs:
|
||||
done
|
||||
echo "Collected signatures:"
|
||||
ls -la release-assets/*.sig || echo "No signatures found"
|
||||
# 查找并复制 latest.json(updater 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 }}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
,
|
||||
"plugins": {
|
||||
"updater": {
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDg4NEM4NUExRUVDMDdFMkIKUldRcmZzRHVvWVZNaUFaVElYbXh5c0QxT1RNaFZ6ZWlydlEyeFU3OG1odm9iTXRoc1FhUXlyM20K",
|
||||
"pubkey": "RWQrfsDuoYVMiAZTIXmxysD1OTMhVzeirvQ2xU78mhvobMthsQaQyr3m",
|
||||
"endpoints": [
|
||||
"https://github.com/jasonyoung/cc-switch/releases/latest/download/latest.json"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user