Merge branch 'main' of https://github.com/AI4ChemS/Eunomia #3
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: publish | |
on: | |
push: | |
branches: [ "main" ] | |
release: | |
types: | |
- created | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python "3.9" | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Check pre-commit | |
run: pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) | |
- name: Publish distribution 📦 to PyPI | |
run: | | |
pip install build | |
python -m build --sdist --wheel --outdir dist/ . | |
twine upload dist/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} |