Skip to content

sqlglot dep

sqlglot dep #22

name: Build and Upload to PyPI
on:
push:
tags:
- "v*"
jobs:
build-and-upload:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- name: Print tag
run: echo ${{ github.ref_name }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
pip install setuptools wheel build toml
- name: Run lint
run: |
ruff check
- name: Run tests
run: |
pip install pytest
pytest -vvvv
- name: Build package
run: python -m build --wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist
- name: Create a Release
uses: elgohr/Github-Release-Action@v5
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: Release ${{ github.ref_name }}
tag: ${{ github.ref_name }}