QuizWhiz Release Process
This document explains how the automated release system works for QuizWhiz and how to create new releases.
π€ Automated Release System
The QuizWhiz project now includes a fully automated release system that:
- Monitors Changes: Automatically detects changes to the
quizwhiz/
directory - Updates README: Automatically updates the README with version information
- Creates Releases: Creates GitHub releases when version numbers change
- Generates Blog Posts: Creates blog posts for new releases
- Tracks Changes: Generates changelogs and file diff summaries
π How to Create a New Release
Method 1: Using the Version Update Script (Recommended)
- Update the version using the script:
cd quizwhiz node scripts/update-version.js 3.6.0
- Edit the CHANGELOG.md:
- The script will add a template entry
- Fill in the actual changes you made
- Test your changes:
- Open
index.html
in your browser - Verify everything works correctly
- Open
- Commit and push:
git add . git commit -m "chore: bump version to 3.6.0" git push
- Automatic magic happens:
- GitHub Actions detects the version change
- Creates a new release with changelog
- Updates README with version info
- Generates a blog post
Method 2: Manual Version Update
- Update version in these files:
js/main.js
: Changethis.version = "3.5"
components/footer.html
: Update the version spanpackage.json
: Update the version field
Update CHANGELOG.md with your changes
- Commit and push your changes
π What Gets Generated Automatically
GitHub Release
- Tag:
quizwhiz-v{version}
- Title:
QuizWhiz v{version}
- Body: Includes changelog, file diffs, and links
Blog Post
- Location:
blog/_posts/{date}-quizwhiz-v{version}-release.md
- Content: Release announcement with features and links
- Format: Jekyll-compatible markdown
README Updates
- Version Information Section: Auto-updated with current version
- Timestamp: When the update was made
- Auto-generated Notice: Indicates automated updates
π§ Workflow Configuration
The workflow is defined in .github/workflows/quizwhiz-auto-release.yml
and triggers on:
- Push to main branch with changes in
quizwhiz/
directory - Manual trigger via GitHub Actions UI
Key Features:
- Version Detection: Extracts version from
js/main.js
- Change Detection: Compares with previous commit
- Changelog Generation: Creates changelog from git commits
- File Diff Summary: Lists changed files with statistics
- Conditional Release: Only creates releases when version changes
π Best Practices
Commit Messages
Use conventional commit format for better changelog generation:
feat: add new quiz feature
fix: resolve flashcard flip issue
docs: update README
chore: bump version to 3.6.0
Version Numbering
Follow semantic versioning:
- Major (4.0.0): Breaking changes
- Minor (3.6.0): New features, backwards compatible
- Patch (3.5.1): Bug fixes, backwards compatible
Testing Before Release
Always test your changes:
- Open the application locally
- Test new features
- Verify existing functionality
- Check responsive design
π οΈ Troubleshooting
Release Not Created
- Check if version number actually changed
- Verify the workflow ran successfully in GitHub Actions
- Ensure you have proper permissions
README Not Updated
- Check if the workflow completed successfully
- Verify the README format matches expected structure
Blog Post Not Created
- Ensure the
blog/_posts/
directory exists - Check workflow logs for errors
π Support
If you encounter issues with the release process:
- Check the GitHub Actions logs
- Verify file permissions and structure
- Create an issue in the repository
Happy releasing! π