@krx3d/tizentube2 1.30.860 → 1.30.880

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -210,17 +210,58 @@ jobs:
210
210
  # ----------------------------
211
211
  # Sign and package the standalone app with Tizen Studio
212
212
  # ----------------------------
213
+ # Kept across runs, so one successful download is enough and an outage
214
+ # on Tizen's server cannot block a release on its own. Run 39221552892
215
+ # failed here with nothing but "curl: (22) 404", which read as a problem
216
+ # with this repository — it was not. Checked at the time: /releases/ on
217
+ # the same host answered 200 while everything under /sdk/ answered 404,
218
+ # including the Latest/ folder that search engines have indexed as
219
+ # holding files dated November 2025. There was no working URL to move to.
220
+ - name: Restore the Tizen Studio installer from cache
221
+ id: tizen_cache
222
+ uses: actions/cache@v4
223
+ with:
224
+ path: tizen-installer
225
+ key: tizen-installer-${{ env.TIZEN_STUDIO_VER }}-ubuntu-64
226
+
213
227
  - name: Download Tizen Studio CLI
228
+ if: steps.tizen_cache.outputs.cache-hit != 'true'
214
229
  run: |
215
230
  set -euo pipefail
216
- curl -fL -o tizen-installer "https://download.tizen.org/sdk/Installer/tizen-studio_${TIZEN_STUDIO_VER}/web-cli_Tizen_Studio_${TIZEN_STUDIO_VER}_ubuntu-64.bin"
217
- chmod +x tizen-installer
231
+ URL="https://download.tizen.org/sdk/Installer/tizen-studio_${TIZEN_STUDIO_VER}/web-cli_Tizen_Studio_${TIZEN_STUDIO_VER}_ubuntu-64.bin"
232
+ echo "Fetching ${URL}"
233
+
234
+ # Retried, because a download of this size from this host fails
235
+ # transiently often enough to be worth it. A 404 will not improve on
236
+ # retry, so that case breaks out immediately and is reported as what
237
+ # it is rather than as six identical failures.
238
+ for i in 1 2 3 4 5; do
239
+ CODE=$(curl -sSL -o tizen-installer -w '%{http_code}' "$URL" || echo 000)
240
+ if [ "$CODE" = "200" ] && [ -s tizen-installer ]; then
241
+ echo "attempt ${i}: downloaded $(stat -c%s tizen-installer) bytes"
242
+ chmod +x tizen-installer
243
+ exit 0
244
+ fi
245
+ echo "attempt ${i}: HTTP ${CODE}"
246
+ if [ "$CODE" = "404" ]; then break; fi
247
+ sleep 15
248
+ done
249
+
250
+ # Say which side is broken, so nobody looks here first again. The
251
+ # host is probed separately: an unreachable host and a missing file
252
+ # are different faults with different responses.
253
+ ROOT=$(curl -s -o /dev/null -w '%{http_code}' --max-time 20 https://download.tizen.org/ || echo 000)
254
+ echo "::error::Could not download the Tizen Studio CLI from ${URL} (last HTTP ${CODE}). download.tizen.org itself answered ${ROOT}, so if that is 200 and this is 404 then the SDK tree is broken or has moved on Tizen's side and there is nothing to fix in this repository — check https://download.tizen.org/sdk/Installer/ by hand and re-run when it returns. The installer is cached once a download succeeds, so this cannot block a release twice for the same reason."
255
+ exit 1
218
256
 
219
257
  - name: Install Tizen Studio CLI
220
258
  run: |
221
259
  set -euo pipefail
260
+ chmod +x ./tizen-installer
222
261
  ./tizen-installer --accept-license "${GITHUB_WORKSPACE}/tizen-studio"
223
- rm ./tizen-installer
262
+ # Deliberately not deleted any more: actions/cache saves this path at
263
+ # the end of the job, and removing it here meant there was never
264
+ # anything to save.
224
265
  echo "${GITHUB_WORKSPACE}/tizen-studio/tools/ide/bin" >> $GITHUB_PATH
225
266
 
226
267
  - name: Configure certificate profile
@@ -303,11 +344,95 @@ jobs:
303
344
  run: |
304
345
  bash .github/scripts/build-release-notes.sh "${{ env.RELEASE_SHA }}" "${{ env.RELEASE_VERSION }}" "${{ env.APP_ID }}" "${{ env.APP_NAME }}" "$RUNNER_TEMP/release-notes.md"
305
346
 
347
+ # Was softprops/action-gh-release@v1, replaced after a 403 that could
348
+ # neither be diagnosed nor recovered from. Three faults, all the step's
349
+ # rather than GitHub's:
350
+ #
351
+ # it printed "undefined" as the error body, so a rate limit, a
352
+ # permission problem and a validation error all looked the same
353
+ #
354
+ # it retried three times inside 1.2 seconds (09:41:34.5, :35.3, :35.7)
355
+ # and called that too many retries. An undocumented 403 on a token
356
+ # that worked thirteen hours earlier is a secondary rate limit more
357
+ # often than anything else, and those want tens of seconds
358
+ #
359
+ # it was not idempotent, so a re-run after a partial success had no
360
+ # defined behaviour
361
+ #
362
+ # The .wgt is uploaded as an artifact by the step above, before any of
363
+ # this runs, so a failure here never loses the build.
306
364
  - name: Release TizenTube Standalone
307
- uses: softprops/action-gh-release@v1
308
- with:
309
- tag_name: ${{ env.RELEASE_VERSION }}
310
- target_commitish: ${{ env.RELEASE_SHA }}
311
- body_path: ${{ runner.temp }}/release-notes.md
312
- files: |
313
- standalone/release/*
365
+ env:
366
+ GH_TOKEN: ${{ github.token }}
367
+ TAG: ${{ env.RELEASE_VERSION }}
368
+ TARGET: ${{ env.RELEASE_SHA }}
369
+ NOTES: ${{ runner.temp }}/release-notes.md
370
+ run: |
371
+ set -uo pipefail
372
+ API="https://api.github.com/repos/${GITHUB_REPOSITORY}"
373
+ AUTH="Authorization: Bearer ${GH_TOKEN}"
374
+ JSON="Accept: application/vnd.github+json"
375
+ ID_OF='import json,sys; d=json.load(sys.stdin); print((d.get("id") if isinstance(d,dict) else "") or "")'
376
+
377
+ # Reuse the release if it is already there. That is what makes a
378
+ # re-run safe: an earlier attempt may have created it before failing.
379
+ ID=$(curl -s -H "$AUTH" -H "$JSON" "$API/releases/tags/${TAG}" | python3 -c "$ID_OF" 2>/dev/null || echo '')
380
+
381
+ if [ -n "$ID" ]; then
382
+ echo "release ${TAG} already exists (id ${ID}); its assets will be replaced"
383
+ else
384
+ python3 -c 'import json,io,os,sys; p=sys.argv[3]; b=io.open(p,encoding="utf-8").read() if os.path.exists(p) else ""; print(json.dumps({"tag_name":sys.argv[1],"target_commitish":sys.argv[2],"name":sys.argv[1],"body":b}))' "$TAG" "$TARGET" "$NOTES" > /tmp/release.json
385
+ for delay in 0 15 45 90; do
386
+ if [ "$delay" != "0" ]; then echo "waiting ${delay}s before retrying"; sleep "$delay"; fi
387
+ CODE=$(curl -s -o /tmp/release-out.json -w '%{http_code}' -X POST -H "$AUTH" -H "$JSON" "$API/releases" --data @/tmp/release.json)
388
+ echo "create release ${TAG} -> HTTP ${CODE}"
389
+ if [ "$CODE" = "201" ]; then
390
+ ID=$(python3 -c 'import json;print(json.load(open("/tmp/release-out.json"))["id"])')
391
+ break
392
+ fi
393
+ # 422 means the tag or release turned up meanwhile; take it.
394
+ if [ "$CODE" = "422" ]; then
395
+ ID=$(curl -s -H "$AUTH" -H "$JSON" "$API/releases/tags/${TAG}" | python3 -c "$ID_OF" 2>/dev/null || echo '')
396
+ if [ -n "$ID" ]; then echo "it already existed; reusing id ${ID}"; break; fi
397
+ fi
398
+ # Unlike the action this replaces, say what GitHub actually said.
399
+ head -c 500 /tmp/release-out.json; echo
400
+ done
401
+ fi
402
+
403
+ if [ -z "$ID" ]; then
404
+ echo "::error::Could not create or find release ${TAG}. GitHub's own message is printed above. A 403 here, with a token that worked on earlier releases, is usually a secondary rate limit — re-running this job later is the first thing to try. The .wgt is attached to this run as an artifact either way, so nothing is lost."
405
+ exit 1
406
+ fi
407
+
408
+ UPLOAD="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${ID}/assets"
409
+ ASSET_ID='import json,sys; print(next((str(a["id"]) for a in json.load(sys.stdin) if a["name"]==sys.argv[1]), ""))'
410
+ FAILED=0
411
+ for file in standalone/release/*; do
412
+ if [ ! -f "$file" ]; then continue; fi
413
+ NAME=$(basename "$file")
414
+
415
+ # Replace rather than fail: an asset of this name may already be
416
+ # attached from an earlier attempt at this same release.
417
+ OLD=$(curl -s -H "$AUTH" -H "$JSON" "$API/releases/${ID}/assets?per_page=100" | python3 -c "$ASSET_ID" "$NAME" 2>/dev/null || echo '')
418
+ if [ -n "$OLD" ]; then
419
+ echo "removing the existing ${NAME} (asset ${OLD})"
420
+ curl -s -o /dev/null -X DELETE -H "$AUTH" -H "$JSON" "$API/releases/assets/${OLD}"
421
+ fi
422
+
423
+ CODE=000
424
+ for delay in 0 15 45; do
425
+ if [ "$delay" != "0" ]; then echo "waiting ${delay}s before retrying ${NAME}"; sleep "$delay"; fi
426
+ CODE=$(curl -s -o /tmp/asset-out.json -w '%{http_code}' -X POST -H "$AUTH" -H "Content-Type: application/octet-stream" --data-binary @"$file" "${UPLOAD}?name=${NAME}")
427
+ echo "upload ${NAME} ($(stat -c%s "$file") bytes) -> HTTP ${CODE}"
428
+ if [ "$CODE" = "201" ]; then break; fi
429
+ head -c 300 /tmp/asset-out.json; echo
430
+ done
431
+ if [ "$CODE" != "201" ]; then FAILED=1; fi
432
+ done
433
+
434
+ if [ "$FAILED" != "0" ]; then
435
+ echo "::error::Release ${TAG} exists but at least one asset did not upload. The .wgt is attached to this run as an artifact, and re-running this job replaces the assets rather than duplicating them."
436
+ exit 1
437
+ fi
438
+ echo "release ${TAG} is complete"