diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..373b2e3 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,74 @@ +{ + "branches": ["main"], + "tagFormat": "${version}", + "plugins": [ + "@semantic-release/commit-analyzer", + [ + "semantic-release-replace-plugin", + { + "replacements": [ + { + "files": ["src/anamnesisai/__init__.py"], + "from": "return \".*\" # semantic-release", + "to": "return \"${nextRelease.version}\" # semantic-release", + "results": [ + { + "file": "src/anamnesisai/__init__.py", + "hasChanged": true, + "numMatches": 1, + "numReplacements": 1 + } + ], + "countMatches": true + }, + { + "files": ["pyproject.toml"], + "from": "version = \".*\" # semantic-release", + "to": "version = \"${nextRelease.version}\" # semantic-release", + "results": [ + { + "file": "pyproject.toml", + "hasChanged": true, + "numMatches": 1, + "numReplacements": 1 + } + ], + "countMatches": true + } + ] + } + ], + "@semantic-release/release-notes-generator", + [ + "@semantic-release/changelog", + { + "changelogTitle": "# Release Notes\n---", + "changelogFile": "docs/changelog.md" + } + ], + [ + "@semantic-release/exec", + { + "prepareCmd": "poetry build", + "publishCmd": "poetry publish" + } + ], + [ + "@semantic-release/github", + { + "assets": ["dist/*.whl", "dist/*.tar.gz"] + } + ], + [ + "@semantic-release/git", + { + "assets": [ + "pyproject.toml", + "docs/changelog.md", + "src/anamnesisai/__init__.py" + ], + "message": "chore(release): ${nextRelease.version}" + } + ] + ] +}