- 
                Notifications
    
You must be signed in to change notification settings  - Fork 58
 
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 
- 
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
This is being refactored because of new Federalist release packaging. Updates coming soon! In order to deploy, the .env file will need to be edited to include the API key for production branch and/or staging.
- Close all running processes in the terminal.
 -   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-endwith the new version numbers. -   Generate a new sitemap. Go through the “Setup instructions” and “Generating a new sitemap.xml” sections in the README of 
code-gov-site-map-generatorto 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-generatorto npm. Once the new version has been published, update the version number forcode-gov-site-map-generatorin the package.json ofcode-gov-front-endand runnpm installto update the package-lock.json. Commit the changes. -  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-datato generate the filter options for the browse projects page and the open tasks page. -   If you haven't created a branch for this release in 
code-gov-front-endyet, create the branch following the branching instructions for releases -   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-dataremote repository into your localcode-gov-front-endrepository. Rungit statusto see what change were made. If there were changes, then commit those changes to the release branch. -  Run 
npm installto download the new components. Commit any changes. 
Test all of the latest updates and release to master.
- Follow the testing instructions to test the branch. Merge changes into master.
 - After master passes all tests, create a PR and merge into staging. (Note: Master should be the most recent code for the site.)
 - When Federalist is done building the site on staging, you can view the updates to staging.
 - Visit staging to verify any changes you made.
 - When satisfied with changes on staging, create a PR from master to production.
 
Note: If you get the following error:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
    at ChildProcess.<anonymous> (/Users/josephcastle/Desktop/Development/DevCode/code-gov-front-end/node_modules/gh-pages/lib/git.js:42:16)
    at ChildProcess.emit (events.js:200:13)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  code: 128,
  message: 'Cloning into ' +
    "'node_mod
Follow the Generating a new SSH key and adding it to the ssh-agent(https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) instructions.
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.
-  Regenerate the dependency_license.json file by running the script 
npm run licenses. Commit the changes. 
- Push the version branch up to GitHub
 -   Merge 
release-{{ version }}back in to themasterbranch -   Run 
git checkout masterandgit pull origin masterto update your local repository - Merge Master into Production to release to https://code.gov.
 - Check that all test's passed for new release's site (e.g., Federalist, Circle, Snyk)
 
-   Run 
npm publishto 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. Use the template provided from the wiki. -   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-teamSlack channel linking to the release. -   Post a message in the 
#code-gov-partnersSlack 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