GithubHelp home page GithubHelp logo

banck / fastlane-plugin-semantic_release Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xotahal/fastlane-plugin-semantic_release

0.0 0.0 0.0 895 KB

Fully automated version management and generator of release notes

License: MIT License

Ruby 100.00%

fastlane-plugin-semantic_release's Introduction

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
  • groups those commits by their type (fix, feat, docs, refactor, chore, etc)
  • and creates formated release notes either in markdown or in slack format

Available parameters:

  • format: 'slack|markdown|plain' (defaults to markdown). This formats the changelog for the destination you need. If you're using this for TestFlight changelogs, we suggest using the plain option
  • title: 'My Title' - is appended to the release notes title, "1.1.8 My Title (YYYY-MM-DD)"
  • display_title: true|false (defaults to true) - allows you to hide the entire first line of the changelog
  • display_links: true|false (defaults to true) - allows you to hide links to commits from your changelog
  • commit_url: 'https://github.com/username/repository/commit' - prepended to the commit ID to build usable links
  • View other options by searching for available_options in conventional_changelog.rb

Example:

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

Options:

  • ignore_scopes: ['android','windows']: allows you to ignore any commits which include a given scope, like this one: feat(android): add functionality not relevant to the release we are producing

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

fastlane-plugin-semantic_release's People

Contributors

banck avatar janziemba avatar lessp avatar pranjal-jain avatar thislooksfun avatar xotahal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.