Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically maintain release notes using GitHub Actions #472

Merged
merged 1 commit into from
Aug 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name-template: "$NEXT_PATCH_VERSION"
tag-template: "v$NEXT_PATCH_VERSION"
categories:
- title: "⚠️ Breaking Changes"
label: "⚠️ Breaking"
- title: "✨ New Features"
label: "✨ Feature"
- title: "🐛 Bug Fixes"
label: "🐛 Bug Fix"
- title: "📚 Documentation"
label: "📚 Docs"
- title: "🏠 Housekeeping"
label: "🏠 Housekeeping"
change-template: "- $TITLE (#$NUMBER) @$AUTHOR"
no-changes-template: "- No changes"
template: |
$CHANGES
12 changes: 12 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on: push
name: Push
jobs:
draftRelease:
name: Draft Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Draft Release
uses: toolmantim/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
797 changes: 1 addition & 796 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Dangerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
danger.import_dangerfile(github: "capistrano/danger")
danger.import_dangerfile(github: "capistrano/danger", branch: "no-changelog")
7 changes: 0 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ platforms :rbx do
gem 'json'
end

# Chandler requires Ruby >= 2.1.0, but depending on the Travis environment,
# we may not meet that requirement. Only include the chandler gem if the Ruby
# requirement is met. (Chandler is used only for `rake release`; see Rakefile.)
if Gem::Requirement.new('>= 2.1.0').satisfied_by?(Gem::Version.new(RUBY_VERSION))
gem 'chandler', '>= 0.1.1'
end

# public_suffix 3+ requires ruby 2.1+
if Gem::Requirement.new('< 2.1').satisfied_by?(Gem::Version.new(RUBY_VERSION))
gem 'public_suffix', '< 3'
Expand Down
7 changes: 3 additions & 4 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
* You must have commit rights to the SSHKit repository.
* You must have push rights for the sshkit gem on rubygems.org.
* You must be using Ruby >= 2.1.0.
* Your `~/.netrc` must be configured with your GitHub credentials, [as explained here](https://github.com/mattbrictson/chandler#2-configure-netrc).

## How to release

1. Run `bundle install` to make sure that you have all the gems necessary for testing and releasing.
2. **Ensure the tests are passing by running `rake test`.** If functional tests fail, ensure you have [Vagrant](https://www.vagrantup.com) installed and have started it with `vagrant up`.
3. Determine which would be the correct next version number according to [semver](http://semver.org/).
4. Update the version in `./lib/sshkit/version.rb`.
5. Update the `CHANGELOG`.
6. Commit the changelog and version in a single commit, the message should be "Preparing vX.Y.Z"
7. Run `rake release`; this will tag, push to GitHub, publish to rubygems.org, and upload the latest changelog entry to the [GitHub releases page](https://github.com/capistrano/sshkit/releases).
5. Commit the `version.rb` change with a message like "Preparing vX.Y.Z"
6. Run `rake release`; this will tag, push to GitHub, and publish to rubygems.org
7. Update the draft release on the [GitHub releases page](https://github.com/capistrano/sshkit/releases) to point to the new tag and publish the release
9 changes: 3 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ RuboCop::RakeTask.new(:lint) do |task|
task.options = ['--lint']
end

task "release:rubygem_push" do
# Delay loading Chandler until this point, since it requires Ruby >= 2.1,
# which may not be available in all environments (e.g. Travis).
# We assume that the person doing `rake release` has Ruby >= 2.1.
require "chandler/tasks"
Rake.application.invoke_task("chandler:push")
Rake::Task["release"].enhance do
puts "Don't forget to publish the release on GitHub!"
system "open https://github.com/capistrano/sshkit/releases"
end