docs/releasing.md
This is the procedure for making a new release of Linguist. The entire process needs to be performed by a member of GitHub staff.
Create a branch for the release: git checkout -b release-vxx.xx.xx
Make sure your local dependencies are up to date: rm Gemfile.lock && script/bootstrap
If the grammar submodules have not been updated recently, update them: git submodule update --remote.
If any submodules are updated:
grammars.yml: script/grammar-compiler update -fbundle exec rake check_grammarsgit commit -abundle exec licensed cache -c vendor/licenses/config.ymlbundle exec licensed status -c vendor/licenses/config.ymlgit commit -aEnsure that samples are updated: bundle exec rake samples
Ensure that tests are green: bundle exec rake test
Build a test gem GEM_VERSION=$(git describe --tags 2>/dev/null | sed 's/-/./g' | sed 's/v//') bundle exec rake build_gem
Test the test gem:
Bump gem version in lib/linguist/VERSION, like this.
Make a PR to github/linguist, like this.
Build a local gem: bundle exec rake build_gem
Merge the github/linguist PR
Tag and push: git tag vx.xx.xx; git push --tags
Create a GitHub release with the pushed tag (https://github.com/github/linguist/releases/new) and populate it using the "Generate release notes" button.
Build a grammars tarball (./script/build-grammars-tarball) and attach it to the GitHub release
Push to rubygems.pkg.github.com -- gem push --key github --host https://rubygems.pkg.github.com/github github-linguist-3.0.0.gem. See Working with the RubyGems registry for more details.
Push to rubygems.org -- gem push github-linguist-3.0.0.gem
Update and deploy the following repositories to use the new gem in production:
github/github - if backporting, label for backporting to the latest version of GitHub Enterprise Server only.github/treelights - this only needs the Linguist version updated to pull the compiled grammars from the Linguist release. If backporting, label for backporting to the latest version of GitHub Enterprise Server only.Note: syntax highlighting changes won't take effect until the updated github/treelights repo has been deployed.