From 1d5ac8dc4e78cfc23f40bb233c12ee2d075950b0 Mon Sep 17 00:00:00 2001 From: viewit Date: Mon, 27 Jul 2026 00:15:22 +0200 Subject: [PATCH] chore(ci): reset NIGHTLY_CHANGELOG.md after each nightly release NIGHTLY_CHANGELOG.md was never cleared by either nightly.yml or release.yml - it only grew across every push, so each nightly release kept re-listing every entry since the last manual reset instead of just what changed since the previous build. Add a step after the Gitea nightly release is created that resets the file to its empty header and pushes the reset commit to nightly. Not part of the workflow's own push-trigger paths, so it doesn't re-trigger a nightly build. --- .gitea/workflows/nightly.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.gitea/workflows/nightly.yml b/.gitea/workflows/nightly.yml index 9b9818c..a3d95f5 100644 --- a/.gitea/workflows/nightly.yml +++ b/.gitea/workflows/nightly.yml @@ -174,3 +174,20 @@ jobs: --data-binary @/tmp/release_body.json \ "https://gitea.it-drui.de/api/v1/repos/viewit/KX-Bridge-Release/releases" rm -f "$BODY_FILE" /tmp/release_body.json + + - name: Reset NIGHTLY_CHANGELOG.md for the next build + env: + GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }} + run: | + . /tmp/nightly_version.env + # The changelog just consumed above must not carry over into the + # next nightly - otherwise every build re-lists all prior entries + # since the last manual reset instead of just what's new. Not in + # nightly.yml's own push-trigger paths, so this commit does not + # re-trigger this workflow. + printf '## Changes in this build\n\n' > NIGHTLY_CHANGELOG.md + git config user.name "gitea-actions" + git config user.email "actions@gitea.it-drui.de" + git add NIGHTLY_CHANGELOG.md + git commit -m "chore: reset NIGHTLY_CHANGELOG.md after nightly-${VERSION} release" || exit 0 + git push https://gitea-actions:${GITEA_TOKEN}@gitea.it-drui.de/viewit/KX-Bridge-Release.git HEAD:nightly