Skip to content

Commit 8c9763d

Browse files
committed
feat: add release-please configuration for automated releases
- Add release-please config for multi-channel releases (alpha/beta/rc/stable) - Configure changelog generation with conventional commit sections - Set up manifest file tracking current version (5.0.0) - Fix version.py to read from correct package name 'deepgram' - Update CI workflow with Python 3.8-3.13 matrix for comprehensive testing This enables automated release management with changelog generation based on conventional commits across multiple release channels.
1 parent b78605c commit 8c9763d

File tree

5 files changed

+168
-3
lines changed

5 files changed

+168
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "5.0.0"
3+
}

.github/release-please-config.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"release-type": "python",
3+
"separate-pull-requests": true,
4+
"group-pull-request-title-pattern": "chore: release ${version}",
5+
"packages": {
6+
".": {
7+
"package-name": "deepgram",
8+
"changelog-sections": [
9+
{
10+
"type": "feat",
11+
"section": "Features"
12+
},
13+
{
14+
"type": "fix",
15+
"section": "Bug Fixes"
16+
},
17+
{
18+
"type": "perf",
19+
"section": "Performance Improvements"
20+
},
21+
{
22+
"type": "revert",
23+
"section": "Reverts"
24+
},
25+
{
26+
"type": "docs",
27+
"section": "Documentation"
28+
},
29+
{
30+
"type": "style",
31+
"section": "Styles"
32+
},
33+
{
34+
"type": "refactor",
35+
"section": "Code Refactoring"
36+
},
37+
{
38+
"type": "test",
39+
"section": "Tests"
40+
},
41+
{
42+
"type": "build",
43+
"section": "Build System"
44+
},
45+
{
46+
"type": "ci",
47+
"section": "Continuous Integration"
48+
}
49+
]
50+
}
51+
}
52+
}

.github/release-please.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main # stable releases
7+
- next # release candidates
8+
- beta # beta releases
9+
- alpha # alpha releases
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
15+
jobs:
16+
compile:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
21+
steps:
22+
- name: Checkout repo
23+
uses: actions/checkout@v4
24+
- name: Set up python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Bootstrap poetry
29+
run: |
30+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
31+
- name: Install dependencies
32+
run: poetry install
33+
- name: Compile
34+
run: poetry run mypy src/
35+
test:
36+
runs-on: ubuntu-latest
37+
needs: compile
38+
strategy:
39+
matrix:
40+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
41+
steps:
42+
- name: Checkout repo
43+
uses: actions/checkout@v4
44+
- name: Set up python
45+
uses: actions/setup-python@v4
46+
with:
47+
python-version: ${{ matrix.python-version }}
48+
- name: Bootstrap poetry
49+
run: |
50+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
51+
- name: Install dependencies
52+
run: poetry install
53+
54+
- name: Test
55+
run: poetry run pytest -rP .
56+
57+
release-please:
58+
runs-on: ubuntu-latest
59+
needs: test
60+
outputs:
61+
release_created: ${{ steps.release.outputs.release_created }}
62+
tag_name: ${{ steps.release.outputs.tag_name }}
63+
prerelease: ${{ steps.release.outputs.prerelease }}
64+
steps:
65+
- uses: googleapis/release-please-action@v4
66+
id: release
67+
with:
68+
config-file: .github/release-please-config.json
69+
manifest-file: .github/.release-please-manifest.json
70+
target-branch: ${{ github.ref_name }}
71+
72+
publish:
73+
needs: release-please
74+
runs-on: ubuntu-latest
75+
if: ${{ needs.release-please.outputs.release_created }}
76+
steps:
77+
- name: Checkout repo
78+
uses: actions/checkout@v4
79+
80+
- name: Set up python
81+
uses: actions/setup-python@v4
82+
with:
83+
python-version: 3.8
84+
85+
- name: Bootstrap poetry
86+
run: |
87+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
88+
89+
- name: Install dependencies
90+
run: poetry install
91+
92+
- name: Build package
93+
run: poetry build
94+
95+
- name: Publish to PyPI
96+
env:
97+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
98+
run: poetry publish
99+
100+
- name: Publish to TestPyPI (for prereleases)
101+
if: ${{ needs.release-please.outputs.prerelease == 'true' }}
102+
env:
103+
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TEST_PYPI_TOKEN }}
104+
run: poetry publish --repository testpypi

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ on: [push]
55
jobs:
66
compile:
77
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
811
steps:
912
- name: Checkout repo
1013
uses: actions/checkout@v4
1114
- name: Set up python
1215
uses: actions/setup-python@v4
1316
with:
14-
python-version: 3.8
17+
python-version: ${{ matrix.python-version }}
1518
- name: Bootstrap poetry
1619
run: |
1720
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
@@ -21,14 +24,17 @@ jobs:
2124
run: poetry run mypy src/
2225
test:
2326
runs-on: ubuntu-latest
27+
strategy:
28+
matrix:
29+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
2430
needs: compile
2531
steps:
2632
- name: Checkout repo
2733
uses: actions/checkout@v4
2834
- name: Set up python
2935
uses: actions/setup-python@v4
3036
with:
31-
python-version: 3.8
37+
python-version: ${{ matrix.python-version }}
3238
- name: Bootstrap poetry
3339
run: |
3440
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1

src/deepgram/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from importlib import metadata
22

3-
__version__ = metadata.version("deepgram-core")
3+
__version__ = metadata.version("deepgram")

0 commit comments

Comments
 (0)