Repository is archived
No commit activity in last 3 years
No release in over 3 years
Rake Tasks for Automating Github Releases
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.14
~> 3.5

Runtime

~> 4.7
~> 12.0
 Project Readme

Github::Rake::Release

Rake Tasks for Automating Github Releases

Installation

Add this line to your application's Gemfile:

group :development do
  gem 'github-rake-release'
end

And then execute:

$ bundle

Or install it yourself as:

$ gem install github-rake-release

Usage

1. Rakefile:

if Rails.env.development?
  require 'github/rake/release'
end

And list all available tasks:

$ bundle exec rake -T

2. Configuration

The gem try to find out the repository name and assume that the branch to be merged to master is develop.

We can customise these values, tho:

# Rakefile
if Rails.env.development?
  require 'github/rake/release'
  Github::Rake::Release.configure do |config|
    config.respository = 'username/repository-name'
    config.merge_from = :development
  end
end

3. Github authentication:

Create a personal access token selecting the scope repo on Github.

Then, export it as:

$ export GITHUB_ACCESS_TOKEN=your_github_token

And, then, authenticate on Github running:

$ bundle exec rake github:auth

4. Merges the develop1 branch into master:

Running:

$ bundle exec rake github:merge

Will simply run:

$ git fetch
$ git checkout master
$ git pull
$ git merge origin/develop
$ git push

[1] see configuration to customise the branch name. ↩

5. Release

Running:

$ bundle exec rake github:release['v0.1.0', 'Release title', 'Release description']

Will run the merge task and create a release tag after merging using the provided parameters. 🚀

6. Debugging

Running:

$ bundle exec rake github:repo

Shows the repository where the release will be created

Running:

$ bundle exec rake github:merge_from

Shows branch configured to be merged into master

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/roalcantara/github-rake-release. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.