From e67ecfd48b02f6ea6c1108dc96718444d8283be7 Mon Sep 17 00:00:00 2001 From: Enrique Sanchez Cardoso Date: Tue, 28 Apr 2026 12:33:53 +0200 Subject: [PATCH] fix: use release start timestamp for delta zip filename The delta zip filename was derived from new Date() inside DeltaCommand.run(), which captures the time when the function executes rather than when the release started. If processing crosses an hour boundary the filename ends up one hour ahead of the release tag (e.g. tag cve_2026-01-29_0200Z contains a file named 2026-01-29_delta_CVEs_at_0300Z.zip). Fixes #124 --- .github/workflows/dist/index.js | 5 ++++- .github/workflows/release.yml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dist/index.js b/.github/workflows/dist/index.js index 73b5ae5e2028..16ffc3da8547 100644 --- a/.github/workflows/dist/index.js +++ b/.github/workflows/dist/index.js @@ -45291,7 +45291,10 @@ class DeltaCommand extends GenericCommand { deltaFs.writeTextFile(`release_notes.md`); } else { - const timestamp = new Date(); + const releaseTs = process.env.RELEASE_TIMESTAMP; + const timestamp = releaseTs + ? (() => { const m = releaseTs.match(/^(\d{4}-\d{2}-\d{2})_(\d{2})00Z$/); return m ? new Date(`${m[1]}T${m[2]}:00:00Z`) : new Date(); })() + : new Date(); const delta = await git_Git.newDeltaFromGitHistory(options.start); // console.log(`delta=${JSON.stringify(delta, null, 2)}`); console.log(delta.toText()); diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f7194bb4ea6..500c8e01fb8a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,6 +68,8 @@ jobs: skip_unpack: true if_no_artifact_found: fail - name: build delta files + env: + RELEASE_TIMESTAMP: ${{ needs.generate-name.outputs.v_current_run_timestamp }} run: | ls ./.github/workflows/dist node ./.github/workflows/dist/index.js delta