1
0
Fork 0
sqlglot/.github/workflows/python-publish.yml
Daniel Baumann fb546b57e5
Merging upstream version 11.1.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-13 15:26:26 +01:00

39 lines
1 KiB
YAML

name: Publish Python Release to PyPI
on:
push:
tags:
- "v*"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
make install-dev
- name: Update documentation
run: |
make docs
git add docs
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "CI: Auto-generated documentation" -a | exit 0
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*