@@ -111,30 +111,36 @@ jobs:
111111 run : |
112112 xcrun stapler staple build/macos/Build/Products/Release/OpenGit-${{ steps.version.outputs.version }}.dmg
113113
114- - name : Install Sparkle tools (Reliable Method)
114+ - name : Install Sparkle tools
115115 run : |
116- # On télécharge une version précise des outils Sparkle pour la stabilité
117- curl -L -o sparkle-tools.tar.xz https://github.com/sparkle-project/Sparkle/releases/download/2.6.4/Sparkle-Tools-2.6.4.tar.xz
118- tar -xf sparkle-tools.tar.xz
119- # Le binaire sign_update est maintenant à la racine du dossier
120- chmod +x ./sign_update
116+ curl -L -o sparkle.tar.xz https://github.com/sparkle-project/Sparkle/releases/download/2.6.4/Sparkle-2.6.4.tar.xz
117+
118+ mkdir sparkle_dist
119+ tar -xf sparkle.tar.xz -C sparkle_dist
120+
121+ chmod +x ./sparkle_dist/bin/sign_update
122+
123+ echo "Sign tool path: $(pwd)/sparkle_dist/bin/sign_update"
121124
122125 - name : Generate Sparkle Signature & Appcast
123126 env :
124127 SPARKLE_PRIVATE_KEY : ${{ secrets.SPARKLE_PRIVATE_KEY }}
125128 run : |
126- # 1. On signe le DMG avec la clé privée EdDSA
129+ SIGN_TOOL="./sparkle_dist/bin/sign_update"
130+
127131 DMG_PATH="build/macos/Build/Products/Release/OpenGit-${{ steps.version.outputs.version }}.dmg"
128132
129- # On récupère la signature (on utilise ./sign_update qu'on vient de télécharger)
130- SIGNATURE=$(./sign_update -s "$SPARKLE_PRIVATE_KEY" "$DMG_PATH")
133+ SIGNATURE=$($SIGN_TOOL -s "$SPARKLE_PRIVATE_KEY" "$DMG_PATH")
134+
135+ if [ -z "$SIGNATURE" ]; then
136+ echo "Erreur : La signature n'a pas pu être générée. Vérifie ta clé privée dans les secrets."
137+ exit 1
138+ fi
131139
132- # 2. Préparation des métadonnées
133140 FILE_SIZE=$(stat -f%z "$DMG_PATH")
134141 PUB_DATE=$(date -R)
135142 DOWNLOAD_URL="https://github.com/DevThibautMonin/open_git/releases/download/${{ steps.version.outputs.tag }}/OpenGit-${{ steps.version.outputs.version }}.dmg"
136143
137- # 3. Génération du fichier appcast.xml
138144 cat <<EOF > appcast.xml
139145 <?xml version="1.0" encoding="utf-8"?>
140146 <rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
0 commit comments