{"id":20113704,"url":"https://github.com/archergu/mono-release","last_synced_at":"2025-05-06T12:30:36.000Z","repository":{"id":36964636,"uuid":"503980869","full_name":"ArcherGu/mono-release","owner":"ArcherGu","description":"A tiny monorepo release tool","archived":false,"fork":false,"pushed_at":"2025-05-05T20:01:57.000Z","size":2412,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-05T21:22:45.401Z","etag":null,"topics":["cli","monorepo","release","version"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArcherGu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-06-16T02:06:55.000Z","updated_at":"2025-05-05T20:01:34.000Z","dependencies_parsed_at":"2023-09-24T02:47:50.072Z","dependency_job_id":"6db3fb11-1c76-4c0a-a806-dff17bb6fe6a","html_url":"https://github.com/ArcherGu/mono-release","commit_stats":{"total_commits":153,"total_committers":2,"mean_commits":76.5,"dds":0.2875816993464052,"last_synced_commit":"2d35c2a89e4fd3c99ae8b951838356c953115b97"},"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcherGu%2Fmono-release","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcherGu%2Fmono-release/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcherGu%2Fmono-release/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcherGu%2Fmono-release/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArcherGu","download_url":"https://codeload.github.com/ArcherGu/mono-release/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252683379,"owners_count":21788028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","monorepo","release","version"],"created_at":"2024-11-13T18:25:27.808Z","updated_at":"2025-05-06T12:30:35.993Z","avatar_url":"https://github.com/ArcherGu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mono Release 🎉\n\n[![npm](https://img.shields.io/npm/v/mono-release?style=flat-square)](https://npm.im/mono-release) [![npm](https://img.shields.io/npm/dw/mono-release?style=flat-square)](https://npm.im/mono-release) [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ArcherGu/mono-release/ci.yml?style=flat-square)](https://github.com/ArcherGu/mono-release/actions/workflows/ci.yml)\n\nA tiny monorepo release tool.\n\n## Features\n\n- ➡️ Select a package to operate\n- 🤖 Automatic version derivation\n- 🔖 Semantic version by [semver](https://npm.im/semver)\n- ✅ Configure via file or command line\n- 🔒 Branch protection\n- 🛞 Rollback protection\n- 📄 Changelog by [conventional-changelog-cli](https://npm.im/conventional-changelog-cli)\n- 📦 Unlimited package manager\n- 📢 Also contains a [publish](https://github.com/ArcherGu/mono-release/blob/main/src/publish.ts) command\n\n## Install\n\n```shell\nnpm i mono-release -D\n# Or Yarn\nyarn add mono-release -D\n# Or PNPM\npnpm add mono-release -D\n```\n\n\u003e **Note**: You may need to add `-W` flag to install it in a monorepo workspace.\n\n## Usage\n\nUse directly:\n\n```shell\nnpx mono-release\n# Or\nnpx mor\n```\n\nOr through a script in `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"release\": \"mono-release\"\n  }\n}\n```\n\n### Publish\n\nIt also provides a command for publishing packages:\n\n```shell\nnpx mono-release publish bar@0.0.1\n```\n\nThe tag format must be: `\u003cpkg\u003e@\u003cversion\u003e`.\n\n## Configuration\n\nYou can add a \"mono-release\" key to `package.json` to add configuration for it:\n\n```json\n{\n  \"mono-release\": {\n    \"packagesPath\": \"packages-path\",\n    \"exclude\": [\"pkg-will-not-be-released\"],\n    \"changelog\": true,\n    \"dry\": false,\n    \"push\": true\n  }\n}\n```\n\n`mono-release.config.ts` (`'.js' | '.cjs' | '.mjs' | '.json'`) is also available:\n\n```ts\nimport { defineConfig } from 'mono-release'\n\nexport default defineConfig({\n  packagesPath: 'packages-path',\n  exclude: ['pkg-will-not-be-released'],\n  changelog: true,\n  dry: false,\n  push: true\n})\n```\n\n## CLI Options\n\n### config\n\n```shell\nmono-release --config mono-release.config.ts\n```\n\nUse specified config file.\n\n### specified package\n\n```shell\nmono-release --specified-package pkg-name\n```\n\nSpecified package which will be released, skip selector, ignore `exclude`.\n\n### changelog\n\n```shell\nmono-release --changelog\n# Or disabled\nmono-release --no-changelog\n```\n\nWhether to generate changelog.\n\n\u003e **Note**: You need to install [conventional-changelog-cli](https://npm.im/conventional-changelog-cli) to generate changelog.\n\n### include\n\n```\nmono-release --include pkg1,pkg2,pkg3\n```\n\nInclude packages, if specified, this tool will only work on specified packages, `exclude` will override `include`.\n\n### exclude\n\n```shell\nmono-release --exclude pkg1,pkg2,pkg3\n```\n\nExcludes specified packages (These packages will not appear in the list of options).\n\n### dry\n\n```shell\nmono-release --dry\n```\n\nDry run. (default: `false`)\n\n### disable push\n\n```shell\nmono-release --disable-push\n# Or disabled\nmono-release --no-push\n```\n\nBy default, this tool will push commit and tag to remote, use this option to disable it. (default: `false`)\n\n### commit check\n\n```shell\nmono-release --commit-check\n# Or disabled\nmono-release --no-commit-check\n```\n\nWhether to check commit before release. (default: `true`)\n\n\u003e **Warning**: If disabled, you may lose all uncommited changes when rollback.\n\n### version type\n\n```shell\nmono-release --version-type alpha-minor\n```\n\nDefault version type, if you specify it, will skip version select action. (default: `undefined`)\nAvailable values: `next`, `alpha-minor`, `alpha-major`, `beta-minor`, `beta-major`, `minor`, `major`.\n\n### ci\n\n```shell\nmono-release --ci\n```\n\nRun in CI mode, will skip all select actions, you must specify `--specified-package`.\n\n### ci msg suffix\n\n```shell\nmono-release --ci --ci-msg-suffix \"[skip ci]\"\n```\n\nSpecify commit message suffix in CI mode, example: `[skip ci]`.\n\n### before release\n\n```shell\nmono-release --before-release \"npm run test\"\n```\n\nYou can specify command to be executed before release.\n\n### specified package manager\n\n```shell\nmono-release publish --use pnpm\n```\n\nUse specified package manager for publishing. (default: `npm`)\n\n\u003e **Note**: Some packages may depend on other packages under the same monorepo, and publishing with a specific package manager can handle these relationships automatically. (eg, [pnpm workspace protocol](https://pnpm.io/workspaces#workspace-protocol-workspace))\n\n### before publish\n\n```shell\nmono-release publish --before-publish \"npm run test\"\n```\n\nYou can specify command to be executed before publish.\n\n\u003e **Note**: The default cwd is the package directory when running before publish command\n\n### help\n\n```shell\nmono-release --help\n```\n\nPrint help information.\n\n### version\n\n```shell\nmono-release --version\n```\n\nPrint the version.\n\n## How it works\n\nWhen you need release a package from monorepo project, you can run this tool to execute a command-line script, which you can select the package that needs to release and select a recommended version. It will automatically generate a commit message about this release, and push this commit. In addition, a tag about this version will also be pushed.\n\nMuch of the code for this tool references [Vite](https://github.com/vitejs/vite)'s [release scripts](https://github.com/vitejs/vite/tree/main/scripts). You can observe the details of its release to understand more how it works\n\n## License\n\nMIT License © 2022 [Archer Gu](https://github.com/archergu)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchergu%2Fmono-release","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchergu%2Fmono-release","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchergu%2Fmono-release/lists"}