Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(release): preserve tags when publishing draft releases

Andras Bacsaidecf6c7a9a78
diff --git a/.github/workflows/coolify-release.yml b/.github/workflows/coolify-release.yml
index 9a5580d28f..7951005eea 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 bbf95542d2..7d34b28c76 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');
});