Skip to content

CI

CI #449

Workflow file for this run

name: CI
permissions:
contents: read
on:
push:
pull_request:
release:
types: [published]
schedule:
- cron: '00 6 * * *' # daily at 6AM UTC
workflow_dispatch:
jobs:
scheduled-job:
if: github.event_name == 'schedule'
uses: ./.github/workflows/_testing.yml
check:
uses: ./.github/workflows/_check.yml
lint:
needs: check
if: needs.check.outputs.branch-pr == ''
uses: ./.github/workflows/_pre-commit.yml
test:
needs: lint
if: needs.check.outputs.branch-pr == ''
uses: ./.github/workflows/_testing.yml
docs:
needs: lint
if: needs.check.outputs.branch-pr == ''
uses: ./.github/workflows/_docs.yml
secrets:
deploy_key: ${{ github.event_name == 'release' && secrets.ACTIONS_DOCUMENTATION_DEPLOY_KEY || '' }}
pypi:
name: Publish package to PyPI
runs-on: ubuntu-latest
if: success() && github.event_name == 'release'
needs: [lint, test, docs]
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Build package
run: |
set -vxeuo pipefail
python -m pip install --upgrade pip
pip install build
python -m build
- name: Publish wheels to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./dist/