From ad201da5541a762a74e5c01b42cbc8651d68621b Mon Sep 17 00:00:00 2001 From: brettchien Date: Fri, 14 Aug 2026 17:07:10 +0800 Subject: [PATCH] ci(nightly): stamp version in Asia/Taipei, not UTC The operator is in Asia/Taipei; a nightly version like 0.1.0-nightly.202608141644 now reads as local wall-clock instead of being 8h behind. UTC->TPE only shifts the digits forward, so version monotonicity (which the updater relies on) is preserved. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/nightly.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 69df513..6987282 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -40,9 +40,14 @@ jobs: # apart (a static 0.1.0 would never compare as "newer"). Prerelease-tagged # so it sorts below any real 0.1.0 release. No-op for update detection on # pre-updater main, but harmless. + # + # Timestamp is Asia/Taipei (the operator's timezone), so a nightly version + # reads as local wall-clock. Switching from UTC to TPE only shifts the digits + # +8h forward, so monotonicity is preserved (no future build can stamp lower + # than a past UTC-stamped one). - name: Stamp a monotonic nightly version run: | - ver="0.1.0-nightly.$(date -u +%Y%m%d%H%M)" + ver="0.1.0-nightly.$(TZ='Asia/Taipei' date +%Y%m%d%H%M)" node -e "const fs=require('fs');const f='src-tauri/tauri.conf.json';const j=JSON.parse(fs.readFileSync(f,'utf8'));j.version='$ver';fs.writeFileSync(f,JSON.stringify(j,null,2)+'\n')" echo "NIGHTLY_VERSION=$ver" >> "$GITHUB_ENV" echo "stamped $ver"