Releasing Stacks

The following is a guide to releasing a new version of Stacks and making it available in production on Stack Overflow and Careers.

Create and publish a new version

Section titled Create and publish a new version

Stacks is delivered via NPM, which offers some tools for creating new versions.

  1. Open the Stacks repository in your Terminal to build the CSS and JavaScript by running grunt build.
  2. Now run npm version v[x.x.x]. This will update our package.json files while creating a tag. You can see which version Stacks is at currently by visiting our releases. Our release pattern adheres to the semantic versioning spec.
  3. Now that you’ve created a new version, we’ll need to push the newly-created commit with the version bump. We’ll want to push the tag associated with the version to GitHub so it appears on our releases page. git push --tags.
  4. Draft the release notes on GitHub by choosing the tag you just pushed. Be sure to include a body in the release that describes what changed.
  5. Actually publish the release to NPM. npm publish. This will take you through the publishing workflow if you haven’t already logged in to NPM.
  6. Once all this is completed, you can safely merge develop into production. This deploys our site to https://stackoverflow.design and makes sure our documentation matches the newly-released version.

Ship the new version to Stack Overflow

Section titled Ship the new version to Stack Overflow

In order for the new version of Stacks to be usable on Stack Overflow and Careers, you’ll need to ship to both.

Stack Overflow’s dependencies are now managed via NPM, so updating Stacks there is as simple as bumping the version number in package.json

Within the Careers repo, run the update-stacks.bat script within the Tools directory. This will copy the files from the latest version of the Stacks repo. The script will create a new branch, create a single commit with the updates from Stacks, push the new branch to the repo, and open your browser on the “new pull request” page.