This document describes how to create releases for the BrowserTest (Sonar Quiz System) project.
Releases are automated via GitHub Actions. When you push a version tag to the main branch, a workflow automatically:
- Runs all CI checks (lint, tests, build)
- Builds the production bundle
- Creates a GitHub Release with release notes
- Attaches the bundle artifacts
This project uses Semantic Versioning:
- MAJOR (
X.0.0): Breaking changes - MINOR (
0.X.0): New features (backward-compatible) - PATCH (
0.0.X): Bug fixes (backward-compatible)
- You must have push access to the repository
- The main branch must be in a passing CI state
-
Ensure you're on the latest main branch:
git checkout main git pull origin main
-
Create and push a version tag:
git tag v0.2.0 git push origin v0.2.0
-
Monitor the release workflow:
- Go to the Actions tab
- Watch the "Release" workflow complete (~3-5 minutes)
-
Verify the release:
- Go to the Releases page
- Confirm the new release exists with:
- Correct version number
- Auto-generated release notes
- Attached
sonar-quiz.iife.jsbundle - Attached
sonar-quiz.iife.js.mapsource map
# Create tag and release in one command
gh release create v0.2.0 --generate-notesTags must follow semantic versioning format: vX.Y.Z
| Valid Tags | Invalid Tags |
|---|---|
v0.1.0 |
0.1.0 (missing 'v' prefix) |
v1.0.0 |
v1.0 (missing patch number) |
v10.20.30 |
release-1.0.0 (wrong prefix) |
v2.0.0-beta.1 |
N/A (pre-release not currently supported) |
Each release includes:
- sonar-quiz.iife.js - The production bundle (IIFE format)
- sonar-quiz.iife.js.map - Source map for debugging
- Source code - Automatically generated zip and tar.gz archives
- Check tag format - Must match
vX.Y.Zpattern exactly - Verify tag was pushed:
git ls-remote --tags origin | grep v0.2.0 - Check Actions tab - Look for workflow failures
- Review CI status - Release won't be created if lint/tests/build fail
The release workflow runs the full CI suite. If it fails:
- Fix the issues on main branch
- Delete the failed tag:
git push --delete origin v0.2.0 git tag -d v0.2.0
- Create the tag again after fixes are merged
If you need to re-release (e.g., release was incomplete):
# Delete the existing release
gh release delete v0.2.0 --yes
# Delete the remote tag
git push --delete origin v0.2.0
# Delete local tag
git tag -d v0.2.0
# Create new tag and push
git tag v0.2.0
git push origin v0.2.0The release workflow automatically updates package.json to match the tag version. If there's a mismatch, the tag version is the source of truth.