diff --git a/lib/bake/gem/github/publisher.rb b/lib/bake/gem/github/publisher.rb index af3d51f..886cae2 100644 --- a/lib/bake/gem/github/publisher.rb +++ b/lib/bake/gem/github/publisher.rb @@ -151,7 +151,7 @@ def preserve_release(receipt) metadata = "#{receipt.fetch(:pull_request_url)}\n\nSource: #{receipt.fetch(:commit)}\nSHA256: #{receipt.fetch(:sha256)}\n" Tempfile.create("release") do |file| file.write(JSON.generate( - tag_name: tag, draft: true, target_commitish: receipt.fetch(:commit), name: "#{receipt.fetch(:name)} #{tag}", + tag_name: tag, draft: true, target_commitish: receipt.fetch(:commit), name: tag, body: [notes, metadata].compact.join("\n") )) file.flush diff --git a/releases.md b/releases.md index 7f1bb6f..94a1b3e 100644 --- a/releases.md +++ b/releases.md @@ -1,5 +1,9 @@ # Releases +## Unreleased + + - Use only the version tag for GitHub release titles. + ## v0.1.0 - Include the version's release notes in GitHub releases using `bake-releases`. diff --git a/test/bake/gem/github/publisher/recovery.rb b/test/bake/gem/github/publisher/recovery.rb index 83287c8..3bde57e 100644 --- a/test/bake/gem/github/publisher/recovery.rb +++ b/test/bake/gem/github/publisher/recovery.rb @@ -73,6 +73,7 @@ def restore it "uses the artifact metadata when release notes are missing" do receipt = @publisher.publish(42) + expect(@publisher.releases.first.fetch("name")).to be == "v1.0.1" expect(@publisher.releases.first.fetch("body")).to be == <<~MARKDOWN https://github.com/socketry/example/pull/42