diff --git a/.github/workflows/publish_agentkit.yml b/.github/workflows/publish_agentkit.yml new file mode 100644 index 000000000..d3c67ef9c --- /dev/null +++ b/.github/workflows/publish_agentkit.yml @@ -0,0 +1,51 @@ +name: Release AgentKit to PyPI + +on: + workflow_dispatch: + +jobs: + deploy-agentkit: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./cdp-agentkit-core + environment: + name: pypi + url: https://pypi.org/p/cdp-agentkit-core + 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: ./cdp-agentkit-core/.venv + key: venv-agentkit-${{ runner.os }}-3.10-${{ hashFiles('cdp-agentkit-core/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 }} diff --git a/.github/workflows/publish_langchain.yml b/.github/workflows/publish_langchain.yml new file mode 100644 index 000000000..8cb0e84e3 --- /dev/null +++ b/.github/workflows/publish_langchain.yml @@ -0,0 +1,51 @@ +name: Release LangChain to PyPI + +on: + workflow_dispatch: + +jobs: + deploy-langchain: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./cdp-langchain + environment: + name: pypi + url: https://pypi.org/p/cdp-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: ./cdp-langchain/.venv + key: venv-langchain-${{ runner.os }}-3.10-${{ hashFiles('cdp-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 }}