feat: support extended thinking mode with AnthropicGenerator (#1455) #402
Workflow file for this run
This file contains 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: Core / Project release on PyPi | |
# The pushed tag must be formatted like so: | |
# * integrations/<INTEGRATION_FOLDER_NAME>-v1.0.0 | |
# | |
# For example, if we want to release version 1.0.99 | |
# of the google-vertex-haystack integration we'd have to push the tag: | |
# | |
# integrations/google_vertex-v1.0.99 | |
on: | |
push: | |
tags: | |
- "**-v[0-9].[0-9]+.[0-9]+" | |
jobs: | |
release-on-pypi: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.HAYSTACK_BOT_TOKEN }} | |
fetch-depth: 0 | |
- name: Install Hatch | |
run: pip install hatch | |
- name: Get project folder | |
id: pathfinder | |
shell: python | |
run: | | |
import os | |
project_path = "${{ github.ref_name }}".rsplit("-", maxsplit=1)[0] | |
with open(os.environ['GITHUB_OUTPUT'], 'a') as f: | |
print(f'project_path={project_path}', file=f) | |
- name: Build extra | |
working-directory: ${{ steps.pathfinder.outputs.project_path }} | |
run: hatch build | |
- name: Publish on PyPi | |
working-directory: ${{ steps.pathfinder.outputs.project_path }} | |
env: | |
HATCH_INDEX_USER: __token__ | |
HATCH_INDEX_AUTH: ${{ secrets.PYPI_API_TOKEN }} | |
run: hatch publish -y | |
- name: Generate changelog | |
uses: orhun/git-cliff-action@v4 | |
env: | |
OUTPUT: "${{ steps.pathfinder.outputs.project_path }}/CHANGELOG.md" | |
with: | |
config: cliff.toml | |
args: > | |
--include-path "${{ steps.pathfinder.outputs.project_path }}/**/*" | |
--tag-pattern "${{ steps.pathfinder.outputs.project_path }}-v*" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.HAYSTACK_BOT_TOKEN }} | |
commit-message: "Update changelog for ${{ steps.pathfinder.outputs.project_path }}" | |
branch: update-changelog-${{ steps.pathfinder.outputs.project_path }} | |
base: main | |
title: "docs: update changelog for ${{ steps.pathfinder.outputs.project_path }}" | |
add-paths: | | |
${{ steps.pathfinder.outputs.project_path }}/CHANGELOG.md | |
body: | | |
This PR updates the changelog for ${{ steps.pathfinder.outputs.project_path }} integration | |
with the latest changes just released on PyPi. Please review the changelog diff below and adjust it | |
if necessary. | |
A good changelog diff simply lists these latest changes on top of the CHANGELOG.md file. | |
If there are some diffs that seem out of place, please adjust the CHANGELOG.md file manually. | |
Either way, please merge this PR as soon as possible. | |