|
6 | 6 |
|
7 | 7 | ``` |
8 | 8 | poetry self add poetry-dotenv-plugin |
9 | | -poetry self add poetry-bumpversion |
10 | 9 | ``` |
11 | 10 |
|
12 | 11 | ### Install dependencies |
@@ -58,34 +57,25 @@ poetry run mypy langfuse --no-error-summary |
58 | 57 |
|
59 | 58 | ### Publish release |
60 | 59 |
|
61 | | -#### Release script |
62 | | - |
63 | | -Make sure you have your PyPi API token setup in your poetry config. If not, you can set it up by running: |
64 | | - |
65 | | -```sh |
66 | | -poetry config pypi-token.pypi $your-api-token |
67 | | -``` |
68 | | - |
69 | | -Run the release script: |
70 | | - |
71 | | -```sh |
72 | | -poetry run release |
73 | | -``` |
74 | | - |
75 | | -#### Manual steps (for prepatch versions) |
76 | | - |
77 | | -1. `poetry version patch` |
78 | | - - `poetry version prepatch` for pre-release versions |
79 | | -2. `poetry install` |
80 | | -3. `poetry build` |
81 | | -4. `git commit -am "chore: release v{version}"` |
82 | | -5. `git push` |
83 | | -6. `git tag v{version}` |
84 | | -7. `git push --tags` |
85 | | -8. `poetry publish` |
86 | | - - Create PyPi API token: <https://pypi.org/manage/account/token/> |
87 | | - - Setup: `poetry config pypi-token.pypi your-api-token` |
88 | | -9. Create a release on GitHub with the changelog |
| 60 | +Releases are automated via GitHub Actions using PyPI Trusted Publishing (OIDC). |
| 61 | + |
| 62 | +To create a release: |
| 63 | + |
| 64 | +1. Go to [Actions > Release Python SDK](https://github.com/langfuse/langfuse-python/actions/workflows/release.yml) |
| 65 | +2. Click "Run workflow" |
| 66 | +3. Select the version bump type: |
| 67 | + - `patch` - Bug fixes (1.0.0 → 1.0.1) |
| 68 | + - `minor` - New features (1.0.0 → 1.1.0) |
| 69 | + - `major` - Breaking changes (1.0.0 → 2.0.0) |
| 70 | + - `prerelease` - Pre-release versions (1.0.0 → 1.0.0a1) |
| 71 | +4. For pre-releases, select the type: `alpha`, `beta`, or `rc` |
| 72 | +5. Click "Run workflow" |
| 73 | + |
| 74 | +The workflow will automatically: |
| 75 | +- Bump the version in `pyproject.toml` and `langfuse/version.py` |
| 76 | +- Build the package |
| 77 | +- Publish to PyPI |
| 78 | +- Create a git tag and GitHub release with auto-generated release notes |
89 | 79 |
|
90 | 80 | ### SDK Reference |
91 | 81 |
|
|
0 commit comments