xotahal / fastlane-plugin-semantic_release

Fully automated version management and generator of release notes
MIT License
212 stars 59 forks source link

semantic_release plugin for fastlane

CircleCI License Gem Version fastlane Plugin Badge

Getting Started

fastlane add_plugin semantic_release

About

Automated version managment and generator of release notes. Inspired by semantic-release for npm packages. Based on conventional commits.

Articles

Semantic Release for Fastlane @ Medium - By Jiri Otahal

Available Actions

conventional_changelog

Available parameters:

Example:

notes = conventional_changelog(format: 'slack', title: 'Android Alpha')

analyze_commits

Options:

Example usage:

isReleasable = analyze_commits(match: 'ios/beta*')

It provides these variables in lane_context.

['RELEASE_ANALYZED', 'True if commits were analyzed.'],
['RELEASE_IS_NEXT_VERSION_HIGHER', 'True if next version is higher then last version'],
['RELEASE_LAST_TAG_HASH', 'Hash of commit that is tagged as a last version'],
['RELEASE_LAST_VERSION', 'Last version number - parsed from last tag.'],
['RELEASE_NEXT_MAJOR_VERSION', 'Major number of the next version'],
['RELEASE_NEXT_MINOR_VERSION', 'Minor number of the next version'],
['RELEASE_NEXT_PATCH_VERSION', 'Patch number of the next version'],
['RELEASE_NEXT_VERSION', 'Next version string in format (major.minor.patch)'],

And you can access these like this:

next_version = lane_context[SharedValues::RELEASE_NEXT_VERSION]

 Tests

To run the test suite (contained in ./spec), call bundle exec rake

Questions

If you need anything ping us on twitter.

Jiri Otahal