Releasing Stacks
The following is a guide to releasing a new version of Stacks and making it available in production on Core and Careers.
Stacks is delivered via NPM, which offers some tools for creating new versions.
- Open the Stacks repository in your Terminal to build the CSS and JavaScript by running
grunt build
. - Now run
npm version v[x.x.x]
. This will update ourpackage.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. - 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
. - 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.
- 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. - Once all this is completed, you can safely merge
develop
intomaster
. This deploys our site to https://stackoverflow.design and makes sure our documentation matches the newly-released version.
In order for the new version of Stacks to be usable on Core and Careers, you’ll need to ship to both.
Within Core and Careers, run the update-stacks.bat
script within Tools/
. This will copy the files from the latest version of the Stacks repo. You’ll need to do this for both Core and Careers. 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.