fix(llma): cache cost calculation in the LangChain callback (#346) #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Release" | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - "posthog/version.py" | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| name: Publish release | |
| runs-on: ubuntu-latest | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.POSTHOG_BOT_PAT }} | |
| - name: Set up Python | |
| uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 | |
| with: | |
| python-version: 3.11.11 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5.4.1 | |
| with: | |
| enable-cache: true | |
| pyproject-file: 'pyproject.toml' | |
| - name: Detect version | |
| run: echo "REPO_VERSION=$(python3 posthog/version.py)" >> $GITHUB_ENV | |
| - name: Prepare for building release | |
| run: uv sync --extra dev | |
| - name: Push releases to PyPI | |
| run: uv run make release && uv run make release_analytics | |
| - name: Create GitHub release | |
| uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.POSTHOG_BOT_PAT }} | |
| with: | |
| tag_name: v${{ env.REPO_VERSION }} | |
| release_name: ${{ env.REPO_VERSION }} | |
| - name: Dispatch generate-references for posthog-python | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh workflow run generate-references.yml --ref master |