fix build errors

This commit is contained in:
SoftFever
2026-01-05 00:29:19 +08:00
parent e35f4dbf62
commit b7af2efe4c
2 changed files with 23 additions and 17 deletions

View File

@@ -110,15 +110,15 @@ jobs:
- name: Deploy appcast to Cloudflare KV
if: github.event_name == 'release'
env:
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
KV_NAMESPACE_ID: ${{ secrets.CF_KV_NAMESPACE_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_KV_APPCAST_ID }}
run: |
if [ -n "$CF_API_TOKEN" ] && [ -n "$CF_ACCOUNT_ID" ] && [ -n "$KV_NAMESPACE_ID" ]; then
if [ -n "$CLOUDFLARE_API_TOKEN" ] && [ -n "$CLOUDFLARE_ACCOUNT_ID" ] && [ -n "$KV_NAMESPACE_ID" ]; then
# Deploy appcast.xml
curl -X PUT \
"https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/storage/kv/namespaces/$KV_NAMESPACE_ID/values/appcast.xml" \
-H "Authorization: Bearer $CF_API_TOKEN" \
"https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/storage/kv/namespaces/$KV_NAMESPACE_ID/values/appcast.xml" \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-H "Content-Type: text/plain" \
--data-binary @appcast.xml
echo "Appcast deployed to Cloudflare KV"
@@ -127,8 +127,8 @@ jobs:
if [ -n "${{ steps.signatures.outputs.mac_signature }}" ]; then
echo "${{ steps.signatures.outputs.mac_signature }}" > mac_signature.txt
curl -X PUT \
"https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/storage/kv/namespaces/$KV_NAMESPACE_ID/values/signatures/${{ steps.version.outputs.version }}/mac.sig" \
-H "Authorization: Bearer $CF_API_TOKEN" \
"https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/storage/kv/namespaces/$KV_NAMESPACE_ID/values/signatures/${{ steps.version.outputs.version }}/mac.sig" \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-H "Content-Type: text/plain" \
--data-binary @mac_signature.txt
echo "macOS signature deployed to Cloudflare KV"