From 5f7cfddd3f5a0c0650c9073823fae83c800a1a17 Mon Sep 17 00:00:00 2001 From: Dan Kluser Date: Tue, 2 Jun 2026 22:00:25 +0200 Subject: [PATCH] ci: update actions version; move release date --- .github/workflows/build-image.yml | 19 ++++++++++++++++++- .github/workflows/move-release-tag.yml | 25 ++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 5079754..b9a142a 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -170,7 +170,7 @@ jobs: } >> "$GITHUB_OUTPUT" - name: Move latest tag to current commit - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const ref = 'tags/latest'; @@ -193,3 +193,20 @@ jobs: name: PS5 Linux Image (latest) body: ${{ steps.body.outputs.text }} make_latest: true + + - name: Refresh release publish date + uses: actions/github-script@v8 + with: + script: | + const { data: rel } = await github.rest.repos.getReleaseByTag({ + ...context.repo, tag: 'latest', + }); + // Toggling draft off->on->off re-publishes, resetting published_at + // to now while keeping the same release (reactions/comments survive). + await github.rest.repos.updateRelease({ + ...context.repo, release_id: rel.id, draft: true, + }); + await github.rest.repos.updateRelease({ + ...context.repo, release_id: rel.id, draft: false, make_latest: 'true', + }); + core.info(`re-published release ${rel.id}`); diff --git a/.github/workflows/move-release-tag.yml b/.github/workflows/move-release-tag.yml index 9220c33..8af0e6e 100644 --- a/.github/workflows/move-release-tag.yml +++ b/.github/workflows/move-release-tag.yml @@ -15,7 +15,7 @@ jobs: contents: write steps: - name: Move latest tag to commit - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const ref = 'tags/latest'; @@ -31,3 +31,26 @@ jobs: }); } core.info(`latest -> ${sha}`); + + - name: Refresh release publish date + uses: actions/github-script@v8 + with: + script: | + let rel; + try { + ({ data: rel } = await github.rest.repos.getReleaseByTag({ + ...context.repo, tag: 'latest', + })); + } catch (e) { + if (e.status === 404) { core.info('no latest release yet; skipping'); return; } + throw e; + } + // Toggling draft off->on->off re-publishes, resetting published_at + // to now while keeping the same release (reactions/comments survive). + await github.rest.repos.updateRelease({ + ...context.repo, release_id: rel.id, draft: true, + }); + await github.rest.repos.updateRelease({ + ...context.repo, release_id: rel.id, draft: false, make_latest: 'true', + }); + core.info(`re-published release ${rel.id}`);