From 9c2b9f74396881a2f22b5a38681aefabe4405e40 Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Wed, 11 Aug 2021 10:20:16 -0700 Subject: [PATCH] On gem release, add instructions to author a Github Release (#324) --- Rakefile | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Rakefile b/Rakefile index 9a86eb62e..0d042980c 100644 --- a/Rakefile +++ b/Rakefile @@ -57,12 +57,22 @@ task :release, [:version_bump] do |_t, args| system! "git commit -m \"Release good_job v#{GoodJob::VERSION}\"" system! "git tag v#{GoodJob::VERSION}" - puts "\n== Next steps ==" - puts "Run the following commands:\n\n" - puts " 1. Push commit and tag to Github:" - puts " $ git push origin && git push origin --tags" - puts " 2. Push to Rubygems.org:" - puts " $ gem release" + require 'cgi' + changelog_anchor = "v#{GoodJob::VERSION.delete('.')}-#{Time.now.utc.strftime('%Y-%m-%d')}" + changelog_url = "https://github.com/bensheldon/good_job/blob/main/CHANGELOG.md##{changelog_anchor}" + + puts <<~INSTRUCTIONS + == Next steps == + + Run the following commands: + + 1. Push commit and tag to Github: + $ git push origin && git push origin --tags + 2. Push to Rubygems.org: + $ gem release + 3. Author a Github Release: + https://github.com/bensheldon/good_job/releases/new?tag=v#{GoodJob::VERSION}&body=#{CGI.escape "[Changelog](#{changelog_url})"} + INSTRUCTIONS end require 'rspec/core/rake_task'