publish python packages to pypi in ci #80
Workflow file for this run
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: Test, visualize, and build calitp-map-utils | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- '.github/workflows/build-calitp-map-utils.yml' | |
- 'apps/maps/calitp_map_utils/**' | |
pull_request: | |
paths: | |
- '.github/workflows/build-calitp-map-utils.yml' | |
- 'apps/maps/calitp_map_utils/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
check_and_build: | |
name: check python | |
runs-on: ubuntu-latest | |
steps: | |
- run: sudo apt-get install -y libgraphviz-dev graphviz-dev | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- run: | | |
curl -sSL https://install.python-poetry.org | python - | |
poetry install | |
poetry run mypy calitp_map_utils | |
poetry run pytest --spec | |
poetry run build | |
working-directory: apps/maps | |
# TODO: only run on main/version changes | |
- run: poetry publish | |
working-directory: apps/maps | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_CALITP_MAP_UTILS_TOKEN }} |