Skip to content

Fully automated version management and generator of release notes

License

Notifications You must be signed in to change notification settings

theill/fastlane-plugin-semantic_release

 
 

Repository files navigation

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

  • parses all commits since last version
  • group those commits by their type (fix, feat, docs, refactor, chore, etc)
  • and creates formated release notes either in markdown or in slack format
notes = conventional_changelog(format: 'slack', title: 'Android Alpha')

analyze_commits

  • analyzes your git history
  • finds last tag on current branch (for example ios/beta/1.3.2)
  • parses the last version from tag (1.3.2)
  • gets all commits since this tag
  • analyzes subject of every single commit and increases version number if there is a need (check conventional commit rules)
  • if next version number is higher then last version number it will recommend you to release this version
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)'],

next_version = lane_context[SharedValues::RELEASE_NEXT_VERSION]

Questions

If you need anything ping us on twitter.

Jiri Otahal

About

Fully automated version management and generator of release notes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%