Home
This is our official process for releasing new versions.
- Follow well-established versioning practices
- Provide detailed notes for each release
- Encourage contributions and thank contributors for their hard work
Semantic versioning is a method of numbering release versions that
aims to help users understand the implications of upgrading from one
release to another. Semantic version numbers take the
form major.minor.patch
, where:
- Bug fixes increment the
patch
number (e.g.1.0.0
to1.0.1
) - New features increment the
minor
number and resetpatch
(e.g.1.0.1
to1.1.0
) - Changes to the public API (breaking changes) increment the
major
version and resetminor
andpatch
(e.g.1.1.2
to2.0.0
)
Technically, the release of the Code.gov core front-end code "lives" in 2 places:
- GitHub as a tag and corresponding release
- On npm as a release of the
code-gov-front-end
package with the same version number as the GitHub release
- We have two main branches that are never deleted:
-
master
contains changes being prepped for a release, is always deployable -
dev
used for testing and review of new features
-
- When introducing a change (feature, bug fix, etc.):
-
Branch off
master
:git fetch origin git checkout -b feature-foo origin/master
-
Name your branch pretty much anything except
master
,federalist-
, or with therelease-
orhotfix-
prefix. Suggested prefixes includerefactor-
,feature-
,docs-
,issue#
, andpatch-
. -
File your pull request to merge into the
master
branch.
-
{{ version }}
should always be replaced with the semantic version number, i.e. 1.2.1
- Close all running processes in the terminal.
-
Determine if the version is a patch (
#.#.#
), minor (#.#.0
), or major (#.0.0
) version -
Branch off master and use the branch name format
release-{{ version }}
git pull origin git checkout -b release-{{ version }} origin/master
npm version
will increment the version number semantically in package.json
and commit the changes to git. Versions will be tagged on the master branch.
- For prerelease releases: Run
npm version prerelease --no-tag
. - For patch releases: Run
npm version patch --no-tag
. - For minor releases: Run
npm version minor --no-tag
. - For major releases: Run
npm version major --no-tag
.
- Push the version branch up to GitHub
- Wait for the deployment success message in your terminal
- Check that Federalist deployed the new release's site
- Merge
release-{{ version }}
back in to themaster
branch
- Run 'npm publish' to release the package to the npm directory
- Check that the new release was published to npm
- In GitHub releases select the release draft notes you had previously started or
Draft a new release
- Add the
tag
:v{{ version }}
- Use
target
:master
- Add release notes to the body
- Have at least one team member review the release notes
- Select
Publish release
- Post a message in the
#code-gov-partners
Slack channel linking to the release. Pin the message to the channel. - Post a message to the code@gsa.gov listserv.
- Click "Draft a new release" from the Releases page
- Set the target to master
- Add the title [unreleased]
- Save draft