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 and start by running
npm version v[x.x.x]. This will update our
package.jsonfiles 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
master. 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
content/less/_stacks. 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 single commit with the updates from Stacks.
- If you’re making non-breaking changes, you can often merge this change directly to
masteron Core or Careers. For breaking changes, this is often the first commit in a branch and the corresponding pull request that refactors existing UI to address new changes from Stacks.