Skip to content

Merge pull request #8 from daxa-ai/sid-pypi-release-gitworkflow #1

Merge pull request #8 from daxa-ai/sid-pypi-release-gitworkflow

Merge pull request #8 from daxa-ai/sid-pypi-release-gitworkflow #1

Workflow file for this run

name: Pebblo release on PyPi
on:
push:
tags:
- "v[0-9].[0-9]+.[0-9]+*"
jobs:
build:
name: build_distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11.x"
- name: Install pypa/build
run: |
TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
VERSION=$(echo $TAG | sed 's/v//')
echo "Updating version to $VERSION"
PROJECT_FILE_PATH=pyproject.toml
awk -v new_version="$VERSION" '/^version = "/ {gsub(/"[^"]+"/, "\"" new_version "\"")} 1' "$PROJECT_FILE_PATH" > tmpfile && mv tmpfile "$PROJECT_FILE_PATH"
pip install build
python -m build --wheel
- name: Store the distribution packages
uses: actions/[email protected]
with:
name: pebblo-langchain-package-distributions
path: dist/
release-on-pypi:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download all the dists
uses: actions/[email protected]
with:
name: pebblo-langchain-package-distributions
path: dist/
- name: Upload to PyPI
run: |
pip install twine
twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PEBBLO_LANGCHAIN_PYPI_TOKEN }}