@@ -193,53 +193,6 @@ jobs:
193
193
echo "✅ Signing complete"
194
194
working-directory : packages/desktop
195
195
if : matrix.os == 'windows-2019'
196
-
197
- - name : Update latest.yml with signed file details
198
- shell : bash
199
- run : |
200
- FILE="packages/desktop/out/firefly-${{ env.NETWORK_CODE }}-desktop-${{ env.VERSION }}.exe"
201
-
202
- # Dynamically determine the correct latest.yml file name
203
- if [[ "${{ env.STAGE }}" == "alpha" ]]; then
204
- LATEST_YML="packages/desktop/out/shimmer-alpha.yml"
205
- elif [[ "${{ env.STAGE }}" == "beta" ]]; then
206
- LATEST_YML="packages/desktop/out/shimmer-beta.yml"
207
- else
208
- LATEST_YML="packages/desktop/out/shimmer.yml"
209
- fi
210
-
211
- # Get the file size in bytes
212
- SIZE=$(stat -c%s "$FILE")
213
-
214
- # Calculate Base64-encoded SHA-512 hash using CertUtil
215
- HASH=$(certutil -hashfile "$FILE" SHA512 | tail -n +2 | head -n -1 | tr -d '\r\n' | xxd -r -p | base64)
216
- # Remove any newlines from the HASH
217
- HASH=$(echo "$HASH" | tr -d '\n')
218
-
219
- # Log the calculated hash and file size
220
- echo "Calculated SHA-512 hash (Base64): $HASH"
221
- echo "File size (bytes): $SIZE"
222
-
223
- # Install Chocolatey and yq (for Windows)
224
- if ! command -v yq &> /dev/null; then
225
- echo "yq not found. Installing yq..."
226
- powershell -Command "
227
- Set-ExecutionPolicy Bypass -Scope Process -Force;
228
- [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;
229
- iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'));
230
- choco install yq -y
231
- "
232
- else
233
- echo "yq is already installed."
234
- fi
235
-
236
- # Update the YAML file using yq
237
- yq e ".files[0].sha512 = \"$HASH\"" -i "$LATEST_YML"
238
- yq e ".files[0].size = $SIZE" -i "$LATEST_YML"
239
- yq e ".sha512 = \"$HASH\"" -i "$LATEST_YML"
240
- yq e -i ".files[0].sha512 |= . | .sha512 |= ." "$LATEST_YML"
241
- echo "Updated $LATEST_YML with size=$SIZE and sha512=$HASH"
242
- if : matrix.os == 'windows-2019'
243
196
244
197
- name : Update latest.yml with signed file details
245
198
shell : bash
0 commit comments