beanquery: add stubs; use less private API #1445
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Python package (and upload to PyPI on tags) | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
cache-dependency-path: "constraints*.txt" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "lts/*" | |
cache: "npm" | |
cache-dependency-path: frontend/package-lock.json | |
- run: python -m pip install -c constraints.txt build twine | |
- run: python -m build | |
- run: twine check dist/* | |
- name: Publish release | |
if: github.event_name == 'push' && github.ref_type == 'tag' | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: python -m twine upload dist/* |