See #1247 (comment) for the exact, step by step guide how to release a new version.
There're no hard rules about when to release Sourcery. Release bug fixes frequently, features not so frequently and breaking API changes rarely.
Following the Semantic Versioning:
- Increment the third number if the release has bug fixes and/or very minor features with backward compatibility, only (eg. change
0.6.0
to0.6.1
). - Increment the second number if the release contains major features or breaking API changes (eg. change
0.6.1
to0.7.0
).
Make sure you've been added as owner for CocoaPods Trunk and have push access to the Sourcery repository.
To create automatic GitHub releases, set up API Token. We recommend giving the token the smallest scope possible. This means just public_repo
. After getting the token add the following ENV variables:
export SOURCERY_GITHUB_USERNAME=YOUR_GITHUB_USERNAME
export SOURCERY_GITHUB_API_TOKEN=YOUR_TOKEN
To be able to release a Homebrew formula update, install brew.
Example is for releasing 0.6.1
version of the Sourcery.
To release a new version of the Sourcery please rake task and follow the commands.
rake release:new
It will perform the following steps:
- Install Bundler and CocoaPods dependencies;
- Check if the docs are up-to-date or not;
- Check if the master branch is green on CI;
- Update internal boilerplate code;
- Run tests;
- Ask for the new release version and updates metadata for it;
- Create a new release on GitHub;
- Push new release to CocoaPods Trunk;
- Push new formula to Homebrew, this will ask you for manual input of your username and password to open a GitHub PR;
- Prepare a new development iteration.
Some tasks require manual approvement or input, please pay attention to the automatic changes before confirming them.