From 91cdc557a1c05b57c632b7b6a2bdd8c3a15bdc6e Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 7 Oct 2025 10:57:06 +0200 Subject: [PATCH] Enhance VERSION file creation in workflow Updated the VERSION file creation process to include a timestamp and handle no changes gracefully. --- .github/workflows/publish_release.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index b3b4aef..e1d768a 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -34,17 +34,18 @@ jobs: - name: Create branch and commit VERSION run: | - branch="update-version-${{ steps.draft.outputs.tag_name }}" - git push origin --delete "$branch" || echo "No remote branch to delete" - git fetch origin main - git checkout -b "$branch" origin/main - echo "${{ steps.draft.outputs.tag_name }}" | sed 's/^v//' > VERSION - git add VERSION - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git commit -m "chore: add VERSION ${{ steps.draft.outputs.tag_name }}" - git push --set-upstream origin "$branch" - + branch="update-version-${{ steps.draft.outputs.tag_name }}" + git push origin --delete "$branch" || echo "No remote branch to delete" + git fetch origin main + git checkout -b "$branch" origin/main + version="${{ steps.draft.outputs.tag_name }}" + echo "$version" | sed 's/^v//' > VERSION + echo "# generated at $(date +%s)" >> VERSION + git add VERSION + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git commit -m "chore: add VERSION $version" || echo "No changes" + git push --set-upstream origin "$branch" - name: Create pull request id: pr