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 versionSection titled Create and publish a new version
Stacks is delivered via NPM, which offers some tools for creating new versions.
- Now run
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
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 OverflowSection 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
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.