Skip to content

Upload Python Package #41

Upload Python Package

Upload Python Package #41

Workflow file for this run

name: Upload Python Package
on:
release:
types: [created]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: run black
uses: psf/black@stable
with:
options: "--check --verbose"
jupyter: false
src: "./pydit"
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11.0"
- name: Install poetry and basic tools
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Install dependencies
run: |
python -m poetry install
- name: Run tests
run: |
python -m poetry run python -m pytest -sxv
- name: Build docs
run: |
python -m poetry run sphinx-build ./docs/source ./docs/build -a
- name: Build and publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build