Skip to content

v0.1.2

v0.1.2 #11

Workflow file for this run

# This workflow will upload a Python Package to PyPI when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload Python Package
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
build-n-publish:
name: Build and publish Python 🐍 distribution 📦 to PyPI
runs-on: ubuntu-latest
defaults:
run:
working-directory: libs/oci # Set default for all steps
environment:
name: pypi
url: https://pypi.org/p/langchain-oci
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Build distribution 📦
run: |
pip install build
python -m build
- name: Validate
run: |
pip install dist/*.whl
python -c "import langchain_oci;"
- name: Publish distribution 📦 to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.GH_LC_OCI_PYPI_TOKEN }}
run: |
pip install twine
twine upload dist/* -u $TWINE_USERNAME -p $TWINE_PASSWORD