Skip to content

Commit

Permalink
implementing gha to publish twitter langchain to pypi (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
stat authored Nov 18, 2024
1 parent 5748efb commit 60a56bf
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/publish_twitter_langchain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release Twitter LangChain to PyPI

on:
workflow_dispatch:

jobs:
deploy-twitter-langchain:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./twitter-langchain
environment:
name: pypi
url: https://pypi.org/p/twitter-langchain
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: ./twitter-langchain/.venv
key: venv-twitter-langchain-${{ runner.os }}-3.10-${{ hashFiles('twitter-langchain/poetry.lock') }}

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install

- name: Build package
run: poetry build

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 60a56bf

Please sign in to comment.