A chromium extension example for self-hosting.
On the way to self-hosting, we just need a simple personal web server eg nginx:
nginx
├── index.html # installing guide
├── manifest.xml # current extension version and download url
└── download.crx # current extension package
The server always deploy the latest extension package, and the extension will check the latest version and download it automatically.
References:
- ✅ Windows 10, 11
- ✅ Chrome 113
- ✅ Edge 113
- ❓ MacOS
- ❓ Chrome
- ❓ Edge
- ❓ Linux
Environment Variables .env
:
VITE_APP_ID
: Extension ID, eg:edjeggfemkdejnpgmglbdjcgeecimpce
VITE_APP_HOST_BASE_URL
: Extension host page URL, eg:https://assistant-self-hosting-example.cnine.d2.pub/
GitHub Actions Secrets:
PACK_KEY
: Extension private keyKUBE_CONFIG
: Kubeconfig file content base64 encodedDOCKER_USERNAME
: Docker usernameDOCKER_TOKEN
: Docker username
yarn dev # local development
yarn build # build for extension
Update package.json
version, then run:
next_version=$(node -p "require('./package.json').version")
git add .
git commit -m "chore(release): $next_version" --allow-empty
git tag $next_version
git push origin --all && git push origin --tags