Skip to main content
The release process for Your NewTab is automated with scripts that handle version bumping, building, packaging, and git tagging.

Release Commands

Your NewTab includes three release commands for different version bump types:
bun run release
The default bun run release command performs a patch version bump. Use this for bug fixes and small updates.

What the Release Script Does

When you run a release command, the following steps are executed automatically:
1

Version bump

Updates the version number in package.json according to the specified bump type:
  • Patch: Increments the last digit (bug fixes)
  • Minor: Increments the middle digit, resets patch to 0 (new features)
  • Major: Increments the first digit, resets minor and patch to 0 (breaking changes)
2

Build the extension

Runs bun run build to create a production build:
  • Clears previous builds
  • Compiles Vue components and TypeScript
  • Generates optimized assets
  • Creates browser manifest
3

Pack distribution files

Runs bun run pack to create all distribution formats:
  • extension.zip - For Chrome Web Store
  • extension.crx - For Chrome manual installation
  • extension.xpi - For Firefox Add-ons
4

Git commit and tag

Creates a git commit and tag:
  • Stages package.json changes
  • Commits with message: chore: bump version to v{version}
  • Creates a git tag: v{version}
5

Push to remote

Pushes the commit and tag to the origin repository:
  • Pushes to main branch
  • Pushes the version tag

Version Bump Guidelines

Follow Semantic Versioning principles:
Use for:
  • Bug fixes
  • Performance improvements
  • Documentation updates
  • Minor UI tweaks
bun run release
Use for:
  • New features
  • New quote categories
  • UI enhancements
  • Non-breaking API changes
bun run release:minor
Use for:
  • Breaking changes
  • Major redesigns
  • Significant architectural changes
  • Removal of features
bun run release:major

Pre-Release Checklist

Before running a release command:
1

Ensure clean working directory

git status
Commit or stash any uncommitted changes.
2

Pull latest changes

git pull origin main
3

Run tests

bun run test
bun run typecheck
bun run lint
4

Test locally

Build and test the extension manually:
bun run build
Load the extension/ folder in your browser and verify functionality.
The release script automatically pushes to the main branch and creates a remote tag. Ensure you have the correct permissions and are on the right branch before releasing.

Manual Release Steps

If you prefer to release manually or need to troubleshoot:
1

Update version manually

Edit the version in package.json:
{
  "version": "1.0.1"
}
2

Build and pack

bun run build
bun run pack
3

Commit and tag

git add package.json
git commit -m "chore: bump version to v1.0.1"
git tag v1.0.1
4

Push to remote

git push origin main
git push origin v1.0.1

Publishing to Extension Stores

After creating a release, upload the distribution files to extension stores:

Chrome Web Store

  1. Go to Chrome Web Store Developer Dashboard
  2. Select your extension
  3. Click PackageUpload new package
  4. Upload extension.zip
  5. Fill in any required metadata
  6. Click Submit for review

Firefox Add-ons

  1. Go to Firefox Add-on Developer Hub
  2. Select your extension
  3. Click Upload New Version
  4. Upload extension.xpi
  5. Complete the submission form
  6. Submit for review
Review times vary by platform. Chrome Web Store typically reviews within a few hours to days, while Firefox can take a few days to a week.

Release Script Source

The release automation is implemented in scripts/release.ts. It:
  • Validates the bump type argument
  • Reads and updates package.json
  • Executes build and pack commands
  • Creates git commits and tags
  • Pushes to the remote repository
You can customize the release process by modifying this script.

Troubleshooting

Git push fails

Ensure you have push permissions to the repository and are authenticated:
git remote -v

Build fails during release

The release script will stop if the build fails. Fix any build errors before releasing:
bun run typecheck
bun run lint

Tag already exists

If a version tag already exists, delete it first:
git tag -d v1.0.1
git push origin :refs/tags/v1.0.1
Then run the release command again.

Build docs developers (and LLMs) love