{"id":25959641,"url":"https://github.com/ido-pluto/semantic-release-npm-workspaces-monorepo","last_synced_at":"2026-05-03T13:09:38.053Z","repository":{"id":208325064,"uuid":"721348408","full_name":"ido-pluto/semantic-release-npm-workspaces-monorepo","owner":"ido-pluto","description":"Help you use semantic-release with npm workspaces","archived":false,"fork":false,"pushed_at":"2024-07-07T23:43:00.000Z","size":133,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T03:16:55.355Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ido-pluto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"ido-pluto"}},"created_at":"2023-11-20T21:53:06.000Z","updated_at":"2024-07-07T23:43:01.000Z","dependencies_parsed_at":"2023-11-23T12:43:10.928Z","dependency_job_id":null,"html_url":"https://github.com/ido-pluto/semantic-release-npm-workspaces-monorepo","commit_stats":null,"previous_names":["ido-pluto/semantic-release-npm-workspaces-monorepo"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ido-pluto%2Fsemantic-release-npm-workspaces-monorepo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ido-pluto%2Fsemantic-release-npm-workspaces-monorepo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ido-pluto%2Fsemantic-release-npm-workspaces-monorepo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ido-pluto%2Fsemantic-release-npm-workspaces-monorepo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ido-pluto","download_url":"https://codeload.github.com/ido-pluto/semantic-release-npm-workspaces-monorepo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241904677,"owners_count":20040020,"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":[],"created_at":"2025-03-04T18:42:51.672Z","updated_at":"2026-03-05T21:12:48.876Z","avatar_url":"https://github.com/ido-pluto.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ido-pluto"],"categories":[],"sub_categories":[],"readme":"# Semantic Release with NPM Workspaces\n\nSimplify the process of releasing a monorepo with npm workspaces.\n\nWork with:\n\n- Npm workspaces\n- Bun workspaces\n- Yarn workspaces\n- Pnpm workspaces\n\n\u003e Only publish packages that changed.\n\n# Installation\n\n```bash\nnpm install --save-dev semantic-release-npm-workspaces-monorepo\n```\n\n# Usage\n\nAdd this to your `package.json` of your workspace root:\n\n```json\n{\n  \"workspaces\": [\n    \"packages/*\"\n  ],\n  \"workspaceRelease\": {\n    \"npmRelease\": true,\n    \"release\": {\n      // semantic-release configuration\n    }\n  },\n  \"scripts\": {\n    \"release\": \"semantic-release-npm-workspaces-monorepo\"\n  }\n}\n```\n\nThe default configuration of this package is:\n\n```js\nsettings = {\n    preReleaseVersionTemplate: false, // example: '${version}', override the template in the package.json for pre-release versions\n    registry: 'https://registry.npmjs.org',\n    tagFormat: '${name}@${version}',\n    release: {\n        extends: 'semantic-release-commit-filter',\n        ci: true,\n        branches: [\n            \"main\", \n            \"master\",\n            {\n                name: \"beta\",\n                prerelease: true\n            }\n        ],\n        plugins: [...]\n    },\n    semanticReleaseBin: 'semantic-release',\n    semanticReleaseBinArgs: [],\n\n    // semantic-release pre-configured plugins\n    changelogCommit: true, // create \u0026 update CHANGELOG.md\n    npmRelease: false, // use NPM_TOKEN or OIDC to publish packages\n    extendsReleaseRules: [], // extend defaults release rules\n    extendsNoteGeneratorTypes: [], // extend defaults note generator types\n    extendsDefaultPlugins: [], // add custom plugins additonally to the pre-configured plugins\n}\n```\n\n### How it works\n\n- It will update all the workspace (local dependencies) to the latest version from the registry before running semantic release, respecting configured release channels. When working in a prerelease branch (e.g., beta), it will fetch the latest prerelease version from that channel if available.\n- It will do it by the dependency graph, meaning that it will update the packages in the correct order.\n- Use `semantic-release-commit-filter` to filter the commits to only publish packages that changed.\n\n### Pre-configured plugins\n\nIf you do not specify the `plugins` property in the `release` object, it will use the following plugins:\n\n- @semantic-release/commit-analyzer\n- @semantic-release/release-notes-generator\n- @semantic-release/changelog (if `changelogCommit` is set true)\n- @semantic-release/npm (if `npmRelease` is set true)\n- @semantic-release/github (if `changelogCommit` is set true)\n- @semantic-release/git (if `changelogCommit` is set true)\n\nThe plugins configure with recommended settings.\nCheckout `settings.ts` for more information.\n\n## Per Package Configuration\nIf you need the flexibility to configure some packages separately, you can use the `perPackageConfig` object within the `workspaceRelease` object.\n\n```json\n{\n  \"workspaces\": [\n    \"packages/*\",\n    \"example/*\"\n  ],\n  \"workspaceRelease\": {\n    \"npmRelease\": true,\n\n    \"perPackageConfig\": {\n      \"packages/internal/**\": {\n        // override specific configuration, generate release notes without publishing to npm\n        \"npmRelease\": false\n      },\n      \"example/**\": {\n        // skip package from being checked by semantic-release\n        \"skip\": true\n      }\n    }\n  },\n  \"scripts\": {\n    \"release\": \"semantic-release-npm-workspaces-monorepo\"\n  }\n}\n```\n\n## Examples\n\nSome examples of how to use this package:\n\n- [npm-workspaces-example](https://github.com/ido-pluto/semantic-release-npm-workspaces-monorepo-example)\n- [withastro-utils/utils](https://github.com/withastro-utils/utils)\n\n## How to \"Breaking Changes\"?\n\nThe release of breaking changes can be confusing sometimes.\n\nYou need to write a commit message with `BREAKING CHANGE` in the footer of the commit to trigger a major release.\n\n(You cannot use `BREAKING CHANGE` as the type)\n\n```bash\ngit commit -m \"feat: add new feature\nBREAKING CHANGE: this is a breaking change\"\n```\n\nTo ease the process, you can use the `breaking` type in the commit message to trigger a major release in one line.\n\n```bash\ngit commit -m \"breaking: this is a breaking change\"\n```\n\n\n## OIDC\n\nThis is the new way of auto publish packages to NPM.\nYou only need to connect the repo to NPM through NPM's UI.\n\nWhen using OIDC you MUST set it up to ALL you packages in the monorepo otherwise your CI will fail -\nbecause it uses semantic-release to check for changes.\n\n### How to config\n\nGo to your package settings\n![package-settings.png](docs/package-settings.png)\n\nConfigure the connection\n![connection-config.png](docs/connection-config.png)\n\nDone! you are all set\n![done.png](docs/done.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fido-pluto%2Fsemantic-release-npm-workspaces-monorepo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fido-pluto%2Fsemantic-release-npm-workspaces-monorepo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fido-pluto%2Fsemantic-release-npm-workspaces-monorepo/lists"}