From decf6c7a9a78ed32c89d06624bca73c507e87af3 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Wed, 12 Aug 2026 12:02:37 +0200 Subject: [PATCH] fix(release): preserve tags when publishing draft releases Upgrade github-script to v8 and pass the release tag and target commit when creating and publishing releases. --- .github/workflows/coolify-release.yml | 7 +++++-- tests/Unit/ProductionImageWorkflowTest.php | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coolify-release.yml b/.github/workflows/coolify-release.yml index 9a5580d28..7951005ee 100644 --- a/.github/workflows/coolify-release.yml +++ b/.github/workflows/coolify-release.yml @@ -62,7 +62,7 @@ jobs: - name: Validate and pin draft release id: draft - uses: actions/github-script@v7 + uses: actions/github-script@v8 env: TAG_NAME: ${{ inputs.tag }} with: @@ -107,6 +107,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, release_id: release.id, + tag_name: process.env.TAG_NAME, target_commitish: context.sha, }); core.setOutput('release_id', release.id); @@ -210,7 +211,7 @@ jobs: --tag "${IMAGE}:latest" - name: Publish reviewed draft release - uses: actions/github-script@v7 + uses: actions/github-script@v8 env: RELEASE_ID: ${{ needs.validate.outputs.release_id }} TAG_NAME: ${{ inputs.tag }} @@ -252,5 +253,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, release_id: Number(process.env.RELEASE_ID), + tag_name: process.env.TAG_NAME, + target_commitish: context.sha, draft: false, }); diff --git a/tests/Unit/ProductionImageWorkflowTest.php b/tests/Unit/ProductionImageWorkflowTest.php index bbf95542d..7d34b28c7 100644 --- a/tests/Unit/ProductionImageWorkflowTest.php +++ b/tests/Unit/ProductionImageWorkflowTest.php @@ -41,6 +41,9 @@ it('requires a reviewed draft release before building a stable version', functio ->toContain('release.body?.trim()') ->toContain('bootstrap/getVersion.php') ->toContain('target_commitish: context.sha') + ->toContain('tag_name: process.env.TAG_NAME') + ->toContain('actions/github-script@v8') + ->not->toContain('actions/github-script@v7') ->not->toContain('generate-notes'); });