Skip to content

Commit 5f79a55

Browse files
chore(DM-3038): Automate release procedure with release-please (#2276)
1 parent 4d72b0c commit 5f79a55

6 files changed

Lines changed: 87 additions & 11 deletions

File tree

.gemini/styleguide.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,22 @@ error_data = {"function_name": "foo", "message": "bar"}
163163

164164
- Use the `logging` module with appropriate levels
165165
- Include contextual information for debugging
166-
166+
167+
168+
## Conventional Commit PR Title
169+
- The PR title should follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) spec.
170+
- The type of the conventional commit (fix, feat, docs, perf, chore, etc.) should reflect the type of change made in the PR.
171+
- If the PR contains a breaking change, it should be indicated in the PR title with a `!` after the type/scope, e.g., `feat!: ...` or `fix(core)!: ...`.
172+
- Examples:
173+
- `fix(core): correct data parsing issue`
174+
- `feat(api): add new endpoint for data retrieval`
175+
- `docs: update README with new examples`
176+
- `chore: bump version to 1.2.3`
177+
- `refactor(utils): simplify helper functions`
178+
- `test: add unit tests for new features`
179+
- `style: reformat code with black`
180+
- `perf: improve performance of data processing`
181+
182+
## Breaking Changes
183+
- Breaking changes must be clearly indicated in the PR title and description.
184+
- PRs with breaking changes should be labeled with the next major version label (e.g., `v8` if current version is 7.x.x).

.github/pull_request_template.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ Please describe the change you have made.
55
- [ ] Tests added/updated.
66
- [ ] Documentation updated. Documentation is generated from docstrings - these must be updated according to your change.
77
If a new method has been added it should be referenced in [cognite.rst](https://github.com/cognitedata/cognite-sdk-python/blob/master/docs/source/cognite.rst) in order to generate docs based on its docstring.
8-
- [ ] Changelog updated in [CHANGELOG.md](https://github.com/cognitedata/cognite-sdk-python/blob/master/CHANGELOG.md).
9-
- [ ] Version bumped. If triggering a new release is desired, bump the version number in [_version.py](https://github.com/cognitedata/cognite-sdk-python/blob/master/cognite/client/_version.py) and [pyproject.toml](https://github.com/cognitedata/cognite-sdk-python/blob/master/pyproject.toml) per [semantic versioning](https://semver.org/).
8+
- [ ] The PR title follows the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) spec.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: conventional-pr-title
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize, reopened]
6+
branches: [master]
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: amannn/action-semantic-pull-request@v5
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
with:
16+
types: |
17+
feat
18+
fix
19+
chore
20+
docs
21+
style
22+
refactor
23+
perf
24+
test
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: release-please
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: google-github-actions/release-please-action@v4
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,10 @@ The changelog for SDK version 0.x.x can be found [here](https://github.com/cogni
88

99
For users wanting to upgrade major version, a migration guide can be found [here](MIGRATION_GUIDE.md).
1010

11-
Changes are grouped as follows
12-
- `Added` for new features.
13-
- `Changed` for changes in existing functionality.
14-
- `Deprecated` for soon-to-be removed features.
15-
- `Improved` for transparent changes, e.g. better performance.
16-
- `Removed` for now removed features.
17-
- `Fixed` for any bug fixes.
18-
- `Security` in case of vulnerabilities.
11+
As of 2025-08-29, changes are grouped as follows
12+
- ✨ Features: New features or additions to existing features.
13+
- 🐛 Bug Fixes: Bug fixes.
14+
- ⚡ Improvements: Transparent changes, e.g. better performance.
1915

2016
## [7.83.0] - 2025-08-28
2117
### Added

release-please-config.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"packages": {
3+
".": {
4+
"release-type": "python",
5+
"package-name": "cognite-client",
6+
"bump-files": [
7+
"pyproject.toml",
8+
{
9+
"filename": "cognite/client/_version.py",
10+
"search-regex": "__version__ = \"(.*)\""
11+
}
12+
]
13+
}
14+
},
15+
"changelog-types": [
16+
{ "type": "feat", "section": "✨ Features", "hidden": false },
17+
{ "type": "fix", "section": "🐛 Bug Fixes", "hidden": false },
18+
{ "type": "perf", "section": "⚡ Improvements", "hidden": false },
19+
{ "type": "docs", "section": "📚 Documentation", "hidden": true },
20+
{ "type": "style", "section": "🎨 Styles", "hidden": true },
21+
{ "type": "refactor", "section": "🛠 Refactoring", "hidden": true },
22+
{ "type": "test", "section": "✅ Tests", "hidden": true },
23+
{ "type": "chore", "section": "🔧 Chores", "hidden": true }
24+
]
25+
}

0 commit comments

Comments
 (0)