This guide covers how to publish releases of the Vync plugin and the installer package.
-
Create a release branch with the version number:
git checkout -b release/v1.0.0 git push origin release/v1.0.0
-
GitHub Actions will automatically:
- Run tests to ensure everything works
- Build the plugin (
main.js,manifest.json,styles.css) - Create a Git tag for the version
- Create a GitHub release with the built files attached
- Update version numbers in
package.jsonandmanifest.json
-
Review and publish the release:
- Go to Releases
- Find the draft release
- Edit release notes if needed
- Click "Publish release"
# Build the plugin
cd packages/plugin
bun install
bun test
bun run build
# Create and push tag
git tag v1.0.0
git push origin v1.0.0
# Create GitHub release manually with main.js, manifest.json, styles.cssThe installer package (@techsavvyash/vync-installer) allows users to install the plugin via npx or bunx.
-
Create NPM Account: Sign up at npmjs.com
-
Generate NPM Token:
- Log in to npmjs.com
- Go to Account Settings → Access Tokens
- Click "Generate New Token" → Select "Automation"
- Copy the token (starts with
npm_...)
-
Add Token to GitHub Secrets:
- Go to your repository on GitHub
- Navigate to Settings → Secrets and variables → Actions
- Click "New repository secret"
- Name:
NPM_TOKEN - Value: Paste your token
- Click "Add secret"
-
Setup GitHub Actions Workflow (First-Time Only):
- Copy
packages/installer/publish-installer.yaml.templateto.github/workflows/publish-installer.yaml - This step must be done manually by a repository owner due to workflow permissions
cp packages/installer/publish-installer.yaml.template .github/workflows/publish-installer.yaml git add .github/workflows/publish-installer.yaml git commit -m "chore: add installer publishing workflow" git push - Copy
-
Navigate to Actions:
- Go to your repository's Actions tab
- Select "Publish Installer to NPM" workflow
-
Run the workflow:
- Click "Run workflow"
- Select the branch (usually
main) - Enter the version number (e.g.,
0.0.3) - Click "Run workflow"
-
Wait for completion:
- The workflow will:
- Update
packages/installer/package.jsonwith the new version - Build the installer
- Publish to NPM
- Commit the version bump back to the repository
- Update
- The workflow will:
-
Verify publication:
- Check npmjs.com/package/@techsavvyash/vync-installer
- Test installation:
npx @techsavvyash/vync-installer@latest --help
If you prefer to publish manually or need to troubleshoot:
# Navigate to the installer package
cd packages/installer
# Install dependencies (first time only)
bun install
# Update version number
npm version 0.0.3
# Build the installer
bun run build
# Login to NPM (first time only)
npm login
# Publish to NPM
npm publish --access public
# Commit version bump
git add package.json
git commit -m "chore: bump installer version to 0.0.3"
git pushAfter publishing, verify that users can install it:
# Test with npx
npx @techsavvyash/vync-installer --help
# Test with bunx
bunx @techsavvyash/vync-installer --helpThe plugin repository already has GitHub Actions set up. No additional configuration needed.
Follow the Prerequisites section above to set up NPM token.
Follow Semantic Versioning:
- MAJOR version (1.0.0): Breaking changes
- MINOR version (0.1.0): New features, backwards-compatible
- PATCH version (0.0.1): Bug fixes, backwards-compatible
The installer version should generally match the plugin version, but it's not strictly required:
- When releasing a new plugin version: Create a plugin release first
- Then publish the installer with the same version number
- The installer will always fetch the latest plugin release
- Check that your
NPM_TOKENsecret is set correctly - Verify the token has "Automation" or "Publish" permissions
- Make sure the package name
@techsavvyash/vync-installeris available
- Check the Actions logs for specific errors
- Verify all secrets are set correctly
- Ensure the workflow file syntax is correct
- Wait a few minutes after publishing (NPM propagation)
- Check the package exists: https://www.npmjs.com/package/@techsavvyash/vync-installer
- Verify the
binfield inpackage.jsonis correct - Ensure the built file has execute permissions
- Update CHANGELOG.md
- Run tests:
cd packages/plugin && bun test - Create release branch:
git checkout -b release/vX.Y.Z - Push branch:
git push origin release/vX.Y.Z - Wait for GitHub Actions to complete
- Publish the draft release on GitHub
- Ensure NPM_TOKEN is set in GitHub Secrets
- Go to Actions → "Publish Installer to NPM"
- Run workflow with version number
- Wait for workflow completion
- Verify on npmjs.com
- Test:
npx @techsavvyash/vync-installer --help