-
Notifications
You must be signed in to change notification settings - Fork 60
Front end release management
This is our official process for releasing new versions of code-gov-front-end
.
- Follow well-established versioning practices
- Provide detailed notes for each release
- Encourage contributions and thank contributors for their hard work
See Version Control for more information about semantic versioning and what constitutes a release
See Git Workflow for more information about how to create new branches and suggest changes to @code.gov/*
repositories
{{ version }}
should always be replaced with the semantic version number, i.e. 1.2.1
- Close all running processes in the terminal.
- Checkout to a new branch of
code-gov-front-end
following the Git Workflow - Generate a new sitemap. Go through the “Setup instructions” and “Generating a new sitemap.xml” sections in the README of
code-gov-site-map-generator
to generate a new sitemap.xml file and merge it into the master branch of that repo. Then follow the instructions in Component Release Management to publish a new version ofcode-gov-site-map-generator
to npm. Once the new version has been published, update the version number forcode-gov-site-map-generator
in the package.json ofcode-gov-front-end
. Commit the change. - Update the filters on the browse projects and open task pages. Go through the “Setup instructions” and “Generating new filters” sections in the README of
code-gov-data
to generate the filter options for the browse projects page and the open tasks page. - In
code-gov-front-end
, runnpm run update-data
. This will copy the new versions of repos.json and tasks.json that were just generated (as well as the schema.json) from thecode-gov-data
remote repository into your localcode-gov-front-end
repository. Commit the changes. - Publish new versions of any other components that have changed. If any other components listed at the top of Component Release Management have changed since the last release of
code-gov-front-end
, follow the instructions in Component Release Management to publish new versions to npm and update the package.json ofcode-gov-front-end
with the new version numbers. - Run
npm install
to download the new components. Commit the changes. - Regenerate the dependency_license.json file by running the script
npm run licenses
. Commit the changes. - Commit these changes and submit a PR to merge it into master. Once this PR is merged, proceed to create a release branch.
-
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 master git checkout -b release-{{ version }} origin/master
Example > git checkout -b release-0.0.7 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. See the npm publish
documentation for additional options.
- 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
.
This bumps the version number in package.json
and commits that change. It should echo back the new version number to your terminal command line. git log
should show that new commit.
- Push the version branch up to GitHub
- Merge
release-{{ version }}
back in to themaster
branch - Run
git checkout master
andgit pull origin master
to update your local repository - From master, execute
CODE_GOV_RELATIVE_DIR='/dist/federalist-prod' CODE_GOV_BRANCH='federalist-prod' CODE_GOV_API_KEY='OC457325hyT6DpFm5HBBZ1i8SR6gtp5U2CdqtHZQ' npm run deploy-to-production
to publishfederalist-prod
and deploy to production - Wait for the deployment success message in your terminal
- Check that Federalist deployed the new release's site
- Run
npm publish
to release the package to the npm directory - Check that the new release was published to npm
If you get the following error then run npm login
to authenticate to npm.
npm ERR! publish Failed PUT 401
npm ERR! code E401
npm ERR! You must be logged in to publish packages.
- 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-team
Slack channel linking to the 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 [email protected] listserv.
- Click "Draft a new release" from the Releases page
- Set the target to master
- Add the title [unreleased]
- Save draft