Skip to content
Open
Show file tree
Hide file tree
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
50 changes: 48 additions & 2 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@ jobs:

- name: Test basic import
run: |
python -c "import {{PACKAGE_NAME}}; print('{{PROJECT_NAME}} package imports successfully')"
python -c "import mcp_langfuse; print('mcp-langfuse package imports successfully')"

release:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push'
outputs:
released: ${{ steps.release.outputs.released }}
version: ${{ steps.release.outputs.version }}
tag: ${{ steps.release.outputs.tag }}
steps:
- name: Generate GitHub App Token
id: generate_token
Expand Down Expand Up @@ -65,4 +69,46 @@ jobs:
- name: Release
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
run: npx semantic-release
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
npx semantic-release

- name: Build Python Package
if: success()
run: |
python -m pip install build
python -m build

- name: Upload Build Artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: dist-package
path: dist/
retention-days: 30

publish-pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [test, release]
if: success() && github.event_name == 'push'
environment:
name: pypi
url: https://pypi.org/project/mcp-langfuse/
permissions:
id-token: write

steps:
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: dist-package
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
print-hash: true
verbose: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,6 @@ yarn-error.log*

# Semantic-release
.semantic-release/

# Kiro IDE
.kiro/
Loading
Loading