Aug 16, 2014

Producing a new release for a contrib module

I recently produced my first release of the Optimizely module for There are several steps involved, which I am documenting here in a brief overview of the process specifically for

The sources listed below give a lot more of the details.

I am assuming that you're familiar with the basic concepts and commands for using git to clone a repo, make commits, manage branches, etc.

(0)  Create a release branch within your development repo that will contain your work. You may be using an existing branch, in which case you don't need to do this.

The required convention for naming branches for contrib modules looks like these examples.


The first part, before the hyphen, refers to the major version of Drupal core. The second part refers to the major version of the module you're working on.

Exact version numbers for specific releases are provided in a separate step by doing a git tag.

N.B. On, we are told not to use the master branch.

(1)  When the code in your dev repo is ready for release, git push the branch to the repo on

(2)  In your dev repo, git tag with a tag such as the following.


The recognized suffixes are:  unstable  alpha  beta  rc
These must be lowercase, and there must be a number appended to the suffix if you use one.

  $  git  tag  8.x-2.14-beta1

After tagging the code in the dev branch, git push the tag to

  $  git  push  origin  8.x-2.14-beta1

(3)  On the module's page on, go to Edit > Releases. Click on Add new release to create a new release.

(4)  Finally, on Edit > Releases, check Show snapshot release if you want the release to appear on the module's front page in the list of releases. You may not need to do this if it's been done before for the branch you're working on.

It may take a minute or two for the new release to show up on the site.


On the Version control tab of a module's page on there are excellent instructions that include actual commands to use. For example,

Creating and testing full projects and releases

Release naming conventions

Creating a project release

1 comment:

  1. Perhaps add examples of the actual git commands in each spot where you discuss them. An example:

    "Create a release branch within your development repo..."
    $ git checkout -b 8.x-2.14-beta1