Build_PYPI_Latest #104
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
# This workflow will upload a Python Package using Twine when a release is created | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | |
# Connect to the PYPI | |
# documentation for pyDRTtools | |
name: Build_Dist_Ek | |
on: | |
workflow_dispatch: | |
jobs: | |
python-build-n-publish: | |
name: Build and publish Python distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Initialize Python #3.9 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.x" #3.9 ## Set yp python 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 | |
pip install matplotlib PyQt5 pandas scipy numpy scikit-learn wheel | |
#pip install -r requirement.txt ### new code addded | |
# Use flake8 to wrap source code into package/ python library | |
- name: Lint with flake8 | |
run: | | |
# Stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics ## Linting operations | |
# | |
- name: Build binary wheel and a source tarball | |
run: python setup.py sdist # Execute setup file python -m build --sdist --wheel --outdir dist | |
- name: Build binary distribution | |
run: python setup.py bdist_wheel | |
- name: Publish distribution to PYPI | |
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | |
#pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.PYDRTTOOLS }} | |
repository_url: https://test.pypi.org/legacy/ | |