Skip to content

Update docs more

Update docs more #50

name: Build, unittest and publish
on: [push]
env:
PYTHON_VERSION: "3.10"
AZURE_ARTIFACTS_UPLOAD_URL: "https://pkgs.dev.azure.com/mostertpim/BayesianNetwork/_packaging/BayesianNetwork/pypi/upload/"
jobs:
unittests:
name: Run unittests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with unittest
run: |
python -m unittest
package-and-publish:
name: Build and publish
if: github.ref == 'refs/heads/master'
needs: unittests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build package
run: |
pip install build
python -m build
- name: Publish package
env:
TWINE_USERNAME: ""
TWINE_PASSWORD: ${{ secrets.AZURE_ARTIFACTS_READWRITE_TOKEN }}
TWINE_REPOSITORY_URL: ${{ env.AZURE_ARTIFACTS_UPLOAD_URL }}
run: |
pip install twine
python -m twine upload -r ./dist/*