From 9b86f80a0e9122d98f975fa8fc38fe95f033ea8f Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 18 Sep 2024 15:38:55 +0200 Subject: [PATCH 1/5] Don't generate release description according to input --- .github/workflows/release-process_release-candidate.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release-process_release-candidate.yml b/.github/workflows/release-process_release-candidate.yml index d14701d278..961fe1ed49 100644 --- a/.github/workflows/release-process_release-candidate.yml +++ b/.github/workflows/release-process_release-candidate.yml @@ -9,6 +9,11 @@ on: required: true type: string + publish_release_description: + description: 'Publish the description of the release based on the changelog' + required: true + type: bool + jobs: parse-version: name: Parse input version string @@ -153,6 +158,7 @@ jobs: ref: ${{ needs.parse-version.outputs.branch_name }} - name: Extract changelog + if: ${{ inputs.publish_release_description }} run: python ./scripts/extract_changelog.py --version ${{ needs.parse-version.outputs.version_major }}.${{ needs.parse-version.outputs.version_minor }}.${{ needs.parse-version.outputs.version_patch }} --changelog ./resources/texts/change_log.txt > formatted_changelog.txt - name: Create release From 5373d6fe5438a7afa420c5f0bd04611d408c67c9 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 18 Sep 2024 15:42:44 +0200 Subject: [PATCH 2/5] Set proper input type --- .github/workflows/release-process_release-candidate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-process_release-candidate.yml b/.github/workflows/release-process_release-candidate.yml index 961fe1ed49..978209d0d2 100644 --- a/.github/workflows/release-process_release-candidate.yml +++ b/.github/workflows/release-process_release-candidate.yml @@ -12,7 +12,7 @@ on: publish_release_description: description: 'Publish the description of the release based on the changelog' required: true - type: bool + type: boolean jobs: parse-version: From fa636c235bb6873841f8680380c919da6590c4ed Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 19 Sep 2024 13:36:24 +0200 Subject: [PATCH 3/5] Set explicit empty description when not published --- .github/workflows/release-process_release-candidate.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-process_release-candidate.yml b/.github/workflows/release-process_release-candidate.yml index 978209d0d2..8851d1b9f6 100644 --- a/.github/workflows/release-process_release-candidate.yml +++ b/.github/workflows/release-process_release-candidate.yml @@ -169,8 +169,8 @@ jobs: strategy: replace title: UltiMaker Cura ${{ inputs.cura_version }} draft: true - body-source: file - body: formatted_changelog.txt + body-source: ${{ inputs.publish_release_description && 'file' || 'literal' }} + body: ${{ inputs.publish_release_description && 'formatted_changelog.txt' || '' }} - name: Download artifacts uses: actions/download-artifact@v4.1.7 From 41c734498faaf7d52e5cac36cf5222e9bf47b52e Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 19 Sep 2024 15:53:06 +0200 Subject: [PATCH 4/5] Don't re-create the release if not necessary --- .github/workflows/release-process_release-candidate.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-process_release-candidate.yml b/.github/workflows/release-process_release-candidate.yml index 8851d1b9f6..62051a0809 100644 --- a/.github/workflows/release-process_release-candidate.yml +++ b/.github/workflows/release-process_release-candidate.yml @@ -163,14 +163,15 @@ jobs: - name: Create release uses: notpeelz/action-gh-create-release@v5.0.1 + if: ${{ inputs.publish_release_description }} with: target: ${{ needs.create-tags.outputs.main_commit }} tag: ${{ inputs.cura_version }} strategy: replace title: UltiMaker Cura ${{ inputs.cura_version }} draft: true - body-source: ${{ inputs.publish_release_description && 'file' || 'literal' }} - body: ${{ inputs.publish_release_description && 'formatted_changelog.txt' || '' }} + body-source: file + body: formatted_changelog.txt - name: Download artifacts uses: actions/download-artifact@v4.1.7 From 5261936c4e37d296605dcdb510bf159a09c1c156 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 20 Sep 2024 10:11:27 +0200 Subject: [PATCH 5/5] Make description more explicit --- .github/workflows/release-process_release-candidate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-process_release-candidate.yml b/.github/workflows/release-process_release-candidate.yml index 62051a0809..1afb8aad04 100644 --- a/.github/workflows/release-process_release-candidate.yml +++ b/.github/workflows/release-process_release-candidate.yml @@ -10,7 +10,7 @@ on: type: string publish_release_description: - description: 'Publish the description of the release based on the changelog' + description: 'Create the GitHub release (if existing, the description will be overridden based on the changelog)' required: true type: boolean