Skip to main content

Releasing Extensions

Once you’ve built an extension, you can share it with others. There are two primary methods for releasing extensions: through a Git repository or via GitHub Releases.

Distribution Methods

Pros:
  • Simple to set up
  • Flexible branching strategies
  • Easy rollbacks
  • Supports any Git hosting service
Cons:
  • Requires full repository clone on install
  • All files downloaded (including dev files)
Best for: Most extensions, especially those without build steps

GitHub Releases

Pros:
  • Faster installation (single archive)
  • Can include pre-built binaries
  • Platform-specific builds
  • Smaller download size
Cons:
  • GitHub-specific
  • Requires release workflow
  • More complex setup
Best for: Extensions with build steps, platform-specific code, or large dependencies

Releasing Through Git Repository

This is the simplest and most flexible approach.

Setup

  1. Create a Public Repository Create a public repository on GitHub, GitLab, or any Git hosting service:
  2. Users Install With

Version Management

Update the version in qwen-extension.json when you make changes:
Commit and push:
Users will be prompted to update when you push to the branch they’re tracking.

Managing Release Channels

Use branches or tags for different release channels:

Option 1: Branch-Based Channels

Users install:

Option 2: Tag-Based Versions

Users install specific version:
For extensions with stable/preview/dev channels:
  1. Development Branch (dev)
    • Active development happens here
    • Frequent changes
    • May be unstable
  2. Preview Branch (preview)
    • Merge from dev when ready for testing
    • More stable than dev
    • Feature-complete for next release
  3. Main Branch (main or master)
    • Production-ready
    • Only merge from preview after testing
    • Default installation target
Workflow:

Auto-Update

Users can enable auto-updates:
Their installation will automatically update when you push changes to the tracked branch.

Releasing Through GitHub Releases

GitHub Releases provide a more optimized installation experience.

Creating a Release

  1. Tag Your Version
  2. Create Release on GitHub Go to your repository on GitHub:
    • Click “Releases” → “Create a new release”
    • Select your tag (v1.0.0)
    • Add title and description
    • Attach assets (if needed)
    • Check “Set as the latest release”
    • Click “Publish release”
  3. Users Install
    Qwen Code automatically detects and uses GitHub Releases.

Simple Releases (No Build)

If your extension doesn’t require a build step:
  1. Tag and push
  2. Create GitHub release
  3. GitHub automatically creates archive
Done! No manual asset creation needed.

Custom Pre-Built Archives

For extensions with build steps or platform-specific code:

Archive Structure

Archives must contain the complete extension at the root:
Not like this:

Platform-Specific Assets

Naming convention for platform-specific archives: Format: {platform}.{arch}.{name}.{extension} Platform values:
  • darwin - macOS
  • linux - Linux
  • win32 - Windows
Architecture values:
  • x64 - x86-64/AMD64
  • arm64 - ARM 64-bit
Extensions:
  • .tar.gz - Recommended for macOS/Linux
  • .zip - Recommended for Windows
Examples:
Platform-only (any architecture):
Generic (single asset): If you attach only one asset, it’s used for all platforms:

Building Platform Archives

Example build script: scripts/build-release.sh:
Usage:

GitHub Actions Workflow

Automate releases with GitHub Actions: .github/workflows/release.yml:
Trigger a release:
GitHub Actions automatically builds and creates the release.

Pre-Release Versions

Create pre-releases for testing:
On GitHub, check “Set as a pre-release” when creating the release. Users opt-in to pre-releases:

Extension README

Include a comprehensive README in your extension: README.md:

Best Practices

1. Semantic Versioning

Use Semantic Versioning:
  • 1.0.0 - Initial release
  • 1.0.1 - Bug fix
  • 1.1.0 - New feature (backwards compatible)
  • 2.0.0 - Breaking change

2. Changelog

Maintain a CHANGELOG.md:

3. Git Tags

Tag all releases:

4. Clean Repository

Exclude unnecessary files: .gitignore:
For GitHub Releases, include built files in archives but not in the repository.

5. License

Include a LICENSE file:

6. Documentation

Provide clear documentation:
  • README with installation and usage
  • Examples for all features
  • Configuration instructions
  • Troubleshooting section

Testing Before Release

Local Testing

Install from Git (Before Release)

Push to a branch and test installation:
Verify everything works, then merge to main and create release.

Updating Extensions

When users have your extension installed:

Git Repository Installs

Users update with:
Or update all:

GitHub Release Installs

Users are notified when new releases are available. They can update with:

Troubleshooting

”Extension not found”

Ensure:
  • Repository is public
  • qwen-extension.json is in root
  • Repository URL is correct

”Invalid extension structure”

Verify:
  • Archive has extension files at root (no extra nesting)
  • qwen-extension.json is valid JSON
  • Required files are included

”Build files missing”

For extensions with build steps:
  • Include built files in archives
  • Don’t rely on users building
  • Test archive contents before release

Next Steps