RELEASE.md
This guide walks you through the QUnit release.
QUnit aims for its releases to be reproducible. Recent releases are automatically verified on a regular basis (reproducible builds status). Read more on Wikipedia, and reproducible-builds.org.
⚠️ WARNING ⚠️
Before starting, make sure you have:
- Permission to publish to the jQuery CDN via jquery/codeorigin.jquery.com.
- Permission to publish releases to npm for the
qunitnpm package.System prerequisites:
- Node.js 18, or later.
- Git 2.11, or later.
Ensure that all changes for this release have been merged into the main branch. For patch releases, try landing any other bug fixes; for minor releases, ensure new features have been documented and tested. Major releases likely have their own checklist.
Create a local release branch, and ensure it is up-to-date:
Verify that the canonical repository is cloned (not a fork):
git remote -v
# …
# origin [email protected]:qunitjs/qunit.git
Create or reset the release branch:
git remote update && git checkout -B release -t origin/main
Install dev dependencies:
npm ci
Prepare for the release commit:
node build/prep-release.js @VERSION
git add -p to review the changes.AUTHORS.txt, if you see duplicate entries, then use the .mailmap file to normalize them to a canonical name and e-mail address, and then re-run the above command.History.md to remove changes not relevant to end-users (e.g. changes relating to tests, build, internal refactoring, doc fixes, etc.).Build the release:
node build/build-release.js @VERSION
This script does not need any credentials or permissions, and may be run in a container that can only read-write the current directory. This will edit package.json, then execute npm run build to generate the release artifacts, then create a local clone of jquery/codeorigin.jquery.com, and prepare a local commit for you to later push.
Review the release artifacts, compared to the previous release.
node build/review-package.js @LAST_VERSION
# … review package.json, qunit.js, and qunit.css
Commit your changes with the following message (replace @VERSION with the release version):
Release @VERSION
Push a release branch to GitHub.
Once CI is passing, push again, this time to the (protected) stable-2.x branch.
Verify that your local repo is on a clean checkout with HEAD at the release commit:
git show
# Release x.y.z
# …
And that you have release artefacts from the previous step in your working directory (i.e. same version, and not a "dev" version). If you don't have this, go back to step 4 "Build the release".
head qunit/qunit.js
# /*!
# * QUnit x.y.z
# …
Publish tag to GitHub.
git tag -s "@VERSION" -m "Release @VERSION"
git push --tags
Publish to npm:
npm publish
This will bundle the current directory and publish it to npm with the name and version specified in package.json.
Verify that the release is displayed at https://www.npmjs.com/package/qunit.
Publish to the jQuery CDN: Review the commit and push it:
cd __codeorigin
git show
git push
Verify that the release is listed at https://code.jquery.com/qunit/ and that you can open the JS/CSS files.
You're almost there! Make sure you update GitHub releases using the changelog from History.md.
That's it! If you made it this far, congratulations you have successfully released a version of QUnit!
If anything in the above was inaccurate or unclear, improve it to mmake future releases easier!