Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ on:
default: ""

permissions:
contents: write
contents: read
id-token: write # Required for PyPI Trusted Publishing via OIDC

concurrency:
Expand Down Expand Up @@ -93,7 +93,6 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
token: ${{ secrets.GH_ACCESS_TOKEN }}
persist-credentials: false

- name: Install uv and set Python version
Expand All @@ -104,15 +103,10 @@ jobs:
enable-cache: false

- name: Configure Git
env:
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
run: |
git config user.name "langfuse-bot"
git config user.email "langfuse-bot@langfuse.com"

echo "$GH_ACCESS_TOKEN" | gh auth login --with-token
gh auth setup-git

- name: Get current version
id: current-version
run: |
Expand Down Expand Up @@ -316,13 +310,23 @@ jobs:
env:
STEPS_NEW_VERSION_OUTPUTS_VERSION: ${{ steps.new-version.outputs.version }}

- name: Create release GitHub App token
id: release-token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
client-id: ${{ vars.RELEASE_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
permission-contents: write

- name: Create and push tag
id: push-tag
run: |
gh auth setup-git
git tag "v${STEPS_NEW_VERSION_OUTPUTS_VERSION}"
git push origin "HEAD:${GITHUB_REF_NAME}"
git push origin "v${STEPS_NEW_VERSION_OUTPUTS_VERSION}"
env:
GH_TOKEN: ${{ steps.release-token.outputs.token }}
STEPS_NEW_VERSION_OUTPUTS_VERSION: ${{ steps.new-version.outputs.version }}

- name: Publish to PyPI
Expand All @@ -341,7 +345,7 @@ jobs:
$prerelease_flag \
dist/*.whl dist/*.tar.gz
env:
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
GH_TOKEN: ${{ steps.release-token.outputs.token }}
VERSION: ${{ steps.new-version.outputs.version }}
IS_PRERELEASE: ${{ steps.new-version.outputs.is_prerelease }}

Expand Down
Loading