This guide explains how to create builds and releases for the Zotero Replication Checker plugin.
Automatic Builds (For Testing)
When: On every push to any branch
What happens:
- Code is compiled with TypeScript
- Plugin is bundled with
npm run build - XPI file is created and uploaded as a GitHub artifact
- Artifact is available for 30 days
How to download:
- Go to the Actions tab
- Click on the build workflow run
- Scroll to “Artifacts” section
- Download
zotero-replication-checker-build-[SHA]
Use case: Testing builds before creating official releases
Creating Releases
Method 1: Git Tag (Recommended)
Step-by-step:
- Update version in package.json
# Edit package.json and update version # Example: "version": "0.3.0" → "version": "0.4.0" - Commit the version change
git add package.json git commit -m "Bump version to v0.4.0" - Create and push a git tag
git tag v0.4.0 git push origin v0.4.0 - GitHub Actions will automatically:
- Build the plugin with
npm run build - Read version from
package.json - Create XPI file named
zotero-replication-checker-v0.4.0.xpi - Generate
update.jsonfor auto-updates - Create GitHub release with both files
- Generate release notes from commits
- Build the plugin with
Result: Release appears at https://github.com/forrtproject/flora-zotero/releases
Method 2: Manual Trigger (GitHub UI)
Step-by-step:
- Go to Actions tab on GitHub
- Click Create Release workflow
- Click Run workflow button
- Enter version (e.g.,
v0.4.0) - Click Run workflow
Note: This method uses the version you specify, NOT package.json version
Release Artifacts
Each release includes:
zotero-replication-checker-v[VERSION].xpi- Installable plugin fileupdate.json- Auto-update configuration file
Version Naming
Format: v[MAJOR].[MINOR].[PATCH]
Examples:
v0.3.0- Current releasev0.3.1- Bug fix releasev0.4.0- New features releasev1.0.0- Major releasev1.0.0-beta.1- Pre-release (marked as prerelease)v1.0.0-alpha.1- Early pre-release (marked as prerelease)
Pre-releases:
- Tags containing
alphaorbetaare automatically marked as pre-releases - Example:
v0.4.0-beta.1
Release Checklist
Before creating a release:
- Update
package.jsonversion - Test the build locally with
npm run build - Write release notes in
docs/Release.md(bullet points describing what changed)- The workflow reads this file for the GitHub Release body and automatically
prepends the entry to
CHANGELOG.md, then resetsdocs/Release.mdfor the next cycle
- The workflow reads this file for the GitHub Release body and automatically
prepends the entry to
- Commit all changes
- Create and push git tag
- Verify release on GitHub
- Verify
CHANGELOG.mdwas updated inmainby the workflow commit - Test downloading and installing the XPI
- Announce release (if applicable)
Troubleshooting
Build fails in GitHub Actions
Check:
- Does
npm run buildwork locally? - Are all dependencies in
package.json? - Check the Actions log for specific errors
Release not created
Check:
- Did you push the tag?
git push origin v0.X.Y - Does the tag follow the
v*pattern? - Check GitHub Actions permissions (Settings → Actions → General)
Wrong version in release
Fix:
- Delete the tag:
git tag -d v0.X.Y && git push origin :refs/tags/v0.X.Y - Update
package.jsonversion - Commit and create new tag
Quick Reference
# Local build
npm run build
# Create release (full workflow)
# 1. Update version
vim package.json # Change version to 0.4.0
# 2. Commit
git add package.json
git commit -m "Bump version to v0.4.0"
# 3. Tag and push
git tag v0.4.0
git push origin main
git push origin v0.4.0
# Done! Check GitHub releases page