@bonvoy/plugin-github
v0.12.0
Published
🚢 GitHub releases plugin for bonvoy
Readme
@bonvoy/plugin-github 🚢
GitHub releases and PR plugin for bonvoy
Creates GitHub releases with changelogs and manages release PRs.
Installation
npm install @bonvoy/plugin-githubFeatures
- ✅ Creates GitHub releases for each published package
- ✅ Creates release PRs for PR-based workflow
- ✅ Auto-detects repository from package.json or git remote
- ✅ Includes changelog as release body
- ✅ Automatic prerelease detection (e.g.,
1.0.0-beta.1) - ✅ Draft release support
- ✅ Dry-run support
Configuration
// bonvoy.config.js
export default {
github: {
token: process.env.GITHUB_TOKEN, // default
owner: 'my-org', // optional, auto-detected
repo: 'my-repo', // optional, auto-detected
draft: false, // default
prerelease: false, // default, auto-detected from version
},
};Hooks
This plugin taps into the following hooks:
| Hook | Action |
|------|--------|
| makeRelease | Creates GitHub releases for published packages |
| createPR | Creates a release PR with version bumps and changelog |
Requirements
GITHUB_TOKENenvironment variable- For releases:
contents: writepermission - For PRs:
pull-requests: writepermission
Repository Detection
The plugin auto-detects the repository in this order:
- Config options (
ownerandrepo) package.jsonrepository field (URL or object)- Git remote URL (
git remote get-url origin)
Supported URL formats:
https://github.com/owner/repohttps://github.com/owner/repo.git[email protected]:owner/repo.git
PR Workflow
When using bonvoy prepare, this plugin:
- Creates a PR from the release branch to the base branch
- Sets PR title and body with version bumps and changelog
- Stores PR info in
.bonvoy/release-pr.jsonfor merge detection
Default Behavior
This plugin is loaded automatically by bonvoy. It runs during:
makeReleasehook to create GitHub releasescreatePRhook to create release PRs
License
MIT
