From e8887959d7efbdb0dcc6adf6727a5521e93daf50 Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Fri, 5 Jan 2024 17:29:26 +0100 Subject: [PATCH] Ensure draft releases name and tag-name are handled in release scripts --- .github/workflows/update_release_draft.yml | 2 +- bin/release/extract-pipeline-context | 1 + bin/release/publish-release | 6 +++++- bin/release/update-release-draft | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_release_draft.yml b/.github/workflows/update_release_draft.yml index b963e5e5f83..8f810bc97d1 100644 --- a/.github/workflows/update_release_draft.yml +++ b/.github/workflows/update_release_draft.yml @@ -34,4 +34,4 @@ jobs: --update \ --branch ${{ github.ref_name }} \ ${{ steps.pipeline_context.outputs.current_diff_source_tag }} \ - ${{ steps.pipeline_context.outputs.candidate_tag }} \ + ${{ steps.pipeline_context.outputs.candidate_tag }} diff --git a/bin/release/extract-pipeline-context b/bin/release/extract-pipeline-context index 3d7386478d3..51929afc9b1 100755 --- a/bin/release/extract-pipeline-context +++ b/bin/release/extract-pipeline-context @@ -36,5 +36,6 @@ context_hash = { } warn "~~> Generating context..." +context_hash.each { |k, v| warn "#{k}=#{v}" } context_hash.each { |k, v| puts "#{k}=#{v}" } diff --git a/bin/release/publish-release b/bin/release/publish-release index 8a45993a7b4..6a31f3c2cf0 100755 --- a/bin/release/publish-release +++ b/bin/release/publish-release @@ -7,4 +7,8 @@ candidate_tag = ARGV.first warn "~~> Publishing release draft for #{candidate_tag}..." release = OCTOKIT.releases('solidusio/solidus').find { _1.name == candidate_tag } -OCTOKIT.update_release(release.url, draft: false) +OCTOKIT.update_release( + release.url, + draft: false, + tag_name: candidate_tag, +) diff --git a/bin/release/update-release-draft b/bin/release/update-release-draft index 46f85d1a89f..4b74aa7b638 100755 --- a/bin/release/update-release-draft +++ b/bin/release/update-release-draft @@ -55,6 +55,7 @@ if update } || OCTOKIT.create_release( 'solidusio/solidus', candidate_tag_name, + name: candidate_tag_name, body: notes, target_commitish: branch, draft: true,