https://github.com/deeeed/publisher
Flexible release management tool for JavaScript/TypeScript monorepos
https://github.com/deeeed/publisher
Last synced: 2 months ago
JSON representation
Flexible release management tool for JavaScript/TypeScript monorepos
- Host: GitHub
- URL: https://github.com/deeeed/publisher
- Owner: deeeed
- Created: 2025-02-16T02:35:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-15T11:16:25.000Z (12 months ago)
- Last Synced: 2025-07-16T01:19:00.245Z (12 months ago)
- Language: TypeScript
- Size: 193 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
> ⚠️ **WARNING: DEVELOPMENT IN PROGRESS** ⚠️
>
> This package is currently under active development and is **NOT** ready for production use.
> The API is unstable and subject to breaking changes. Please check back later for the stable release.
# @siteed/publisher
A flexible and powerful release management tool designed for JavaScript/TypeScript monorepos. Automates version management, changelog generation, and package publishing with support for various package managers and CI/CD workflows.
## Features
- 🎯 **Monorepo-aware**: Handles dependencies and versioning across workspace packages
- 🔄 **Flexible Workflows**: Supports different release strategies (independent/fixed/custom)
- 📦 **Package Manager Agnostic**: Works with npm, and Yarn
- 🔧 **Highly Configurable**: Customize every aspect of your release process
- 🤖 **CI/CD Ready**: Automate releases in your CI/CD pipeline
- 📝 **Smart Changelog**: Generates and maintains changelogs automatically
- 🪝 **Hooks**: Pre and post-release hooks for custom tasks
- 🔍 **Validation**: Ensures releases are safe and consistent
## Installation
```bash
# yarn
yarn add -D @siteed/publisher
```
## Quick Start
1. Initialize release configuration in your package:
```bash
npx publisher init
```
2. Configure publisher.config.ts:
```typescript
import { ReleaseConfig } from '@siteed/publisher';
export default {
packageManager: 'yarn',
changelogFile: 'CHANGELOG.md',
git: {
tagPrefix: 'v',
requireCleanWorkingDirectory: true,
commit: true,
push: true
},
hooks: {
preRelease: async () => {
await exec('yarn test');
await exec('yarn build');
},
postRelease: async () => {
await exec('yarn deploy:docs');
}
}
} satisfies ReleaseConfig;
```
3. Release your package:
```bash
npx publisher publish
```
## Configuration
### Global Configuration
Create a `.publisher.config.ts` in your root directory for monorepo-wide settings:
```typescript
import { MonorepoConfig } from '@siteed/publisher';
export default {
versionStrategy: 'independent',
conventionalCommits: true,
packageManager: 'yarn',
gitFlow: false,
packages: {
'packages/*': {
// Default package configuration
}
}
} satisfies MonorepoConfig;
```
### Package-specific Configuration
Each package can have its own `publisher.config.ts`:
```typescript
export default {
tagPrefix: 'my-package-v',
npm: {
publish: true,
registry: 'https://registry.npmjs.org'
},
hooks: {
// Package-specific hooks
}
};
```
## Usage
```bash
# Show available commands
publisher --help
# Initialize configuration
publisher init [package]
# Release a specific package
publisher publish my-package
# Release multiple packages
publisher publish pkg1 pkg2
# Release all packages that have changes
publisher publish --all
# Dry run
publisher publish --dry-run
# Custom version
publisher publish --version 1.2.3
```
## Advanced Features
- **Version Strategies**
- Independent: Each package versioned independently
- Fixed: All packages share the same version
- Custom: Define your own versioning logic
- **Changelog Generation**
- Conventional commits support
- Custom templates
- Multi-package changelogs
- **Git Integration**
- Smart tagging
- Branch protection
- Custom commit messages
- **CI/CD Integration**
- Non-interactive mode
- Environment variable support
- Custom authentication
## Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and contribution guidelines.
## License
MIT © Arthur Breton