Skip to content
Myr

Release-Process.md

This file

Path

Release-Process.md

186 lines · 6.4 KiB · Markdown

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 6549469 point at it.

build: mocha@3.4.1Douglas Christopher Wilsonbefore adoption6549469

lines 1–186why, one step back
1# Express Release Process
23This document contains the technical aspects of the Express release process. The4intended audience is those who have been authorized by the Express Technical5Committee (TC) to create, promote and sign official release builds for Express,6as npm packages hosted on https://npmjs.com/package/express.78## Who can make releases?910Release authorization is given by the Express TC. Once authorized, an individual11must have the following access permissions:1213### 1. Github release access1415The individual making the release will need to be a member of the16expressjs/express team with Write permission level so they are able to tag the17release commit and push changes to the expressjs/express repository18(see Steps 4 and 5).1920### 2. npmjs.com release access2122The individual making the release will need to be made an owner on the23`express` package on npmjs.com so they are able to publish the release24(see Step 6).2526## How to publish a release2728Before publishing, the following preconditions should be met:2930- A release proposal issue or tracking pull request (see "Proposal branch"31 below) will exist documenting:32 - the proposed changes33 - the type of release: patch, minor or major34 - the version number (according to semantic versioning - http://semver.org)35- The proposed changes should be complete.3637There are two main release flows: patch and non-patch.3839The patch flow is for making **patch releases**. As per semantic versioning,40patch releases are for simple changes, eg: typo fixes, patch dependency updates,41and simple/low-risk bug fixes. Every other type of change is made via the42non-patch flow.4344### Branch terminology4546"Master branch"4748- There is a branch in git used for the current major version of Express, named49 `master`.50- This branch contains the completed commits for the next patch release of the51 current major version.52- Releases for the current major version are published from this branch.5354"Version branch"5556- For any given major version of Express (current, previous or next) there is57 a branch in git for that release named `<major-version>.x` (eg: `4.x`).58- This branch points to the commit of the latest tag for the given major version.5960"Release branch"6162- For any given major version of Express, there is a branch used for publishing63 releases.64- For the current major version of Express, the release branch is the65 "Master branch" named `master`.66- For all other major versions of Express, the release branch is the67 "Version branch" named `<major-version>.x`.6869"Proposal branch"7071- A branch in git representing a proposed new release of Express. This can be a72 minor or major release, named `<major-version>.0` for a major release,73 `<major-version>.<minor-version>` for a minor release.74- A tracking pull request should exist to document the proposed release,75 targeted at the appropriate release branch. Prior to opening the tracking76 pull request the content of the release may have be discussed in an issue.77- This branch contains the commits accepted so far that implement the proposal78 in the tracking pull request.7980### Patch flow8182In the patch flow, simple changes are committed to the release branch which83acts as an ever-present branch for the next patch release of the associated84major version of Express.8586The release branch is usually kept in a state where it is ready to release.87Releases are made when sufficient time or change has been made to warrant it.88This is usually proposed and decided using a github issue.8990### Non-patch flow9192In the non-patch flow, changes are committed to a temporary proposal branch93created specifically for that release proposal. The branch is based on the94most recent release of the major version of Express that the release targets.9596Releases are made when all the changes on a proposal branch are complete and97approved. This is done by merging the proposal branch into the release branch98(using a fast-forward merge), tagging it with the new version number and99publishing the release package to npmjs.com.100101### Flow102103Below is a detailed description of the steps to publish a release.104105#### Step 1. Check the release is ready to publish106107Check any relevant information to ensure the release is ready, eg: any108milestone, label, issue or tracking pull request for the release. The release109is ready when all proposed code, tests and documentation updates are complete110(either merged, closed or re-targeted to another release).111112#### Step 2. (Non-patch flow only) Merge the proposal branch into the release branch113114In the patch flow: skip this step.115116In the non-patch flow:117```sh118$ git checkout <release-branch>119$ git merge --ff-only <proposal-branch>120```121122<release-branch> - see "Release branch" of "Branches" above.123<proposal-branch> - see "Proposal branch" of "Non-patch flow" above.124125**NOTE:** You may need to rebase the proposal branch to allow a fast-forward126 merge. Using a fast-forward merge keeps the history clean as it does127 not introduce merge commits.128129### Step 3. Update the History.md and package.json to the new version number130131The changes so far for the release should already be documented under the132"unreleased" section at the top of the History.md file, as per the usual133development practice. Change "unreleased" to the new release version / date.134Example diff fragment:135136```diff137-unreleased138-==========139+4.13.3 / 2015-08-02140+===================141```142143The version property in the package.json should already contain the version of144the previous release. Change it to the new release version.145146Commit these changes together under a single commit with the message set to147the new release version (eg: `4.13.3`):148149```sh150$ git checkout <release-branch>151<..edit files..>152$ git add History.md package.json153$ git commit -m '<version-number>'154```155156### Step 4. Identify and tag the release commit with the new release version157158Create a lightweight tag (rather than an annotated tag) named after the new159release version (eg: `4.13.3`).160161```sh162$ git tag <version-number>163```164165### Step 5. Push the release branch changes and tag to github166167The branch and tag should be pushed directly to the main repository168(https://github.com/expressjs/express).169170```sh171$ git push origin <release-branch>172$ git push origin <version-number>173```174175### Step 6. Publish to npmjs.com176177Ensure your local working copy is completely clean (no extra or changed files).178You can use `git status` for this purpose.179180```sh181$ npm login <npm-username>182$ npm publish183```184185**NOTE:** The version number to publish will be picked up automatically from186 package.json.