diff --git a/.github/workflows/pytest-coverage.yml b/.github/workflows/pytest-coverage.yml index d662679..7afc2c2 100644 --- a/.github/workflows/pytest-coverage.yml +++ b/.github/workflows/pytest-coverage.yml @@ -11,6 +11,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: recursive - name: Set up Python uses: actions/setup-python@v4 @@ -29,10 +31,6 @@ jobs: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi pip install pytest pytest-cov - - name: Git submodule initialization - run: | - git submodule update --init --recursive - - name: Run pytest with coverage run: | python3 -m coverage run -m pytest tests --junitxml=report.xml; coverage report -i --include=src/* diff --git a/.github/workflows/upload-to-pip.yml b/.github/workflows/upload-to-pip.yml new file mode 100644 index 0000000..d5fef26 --- /dev/null +++ b/.github/workflows/upload-to-pip.yml @@ -0,0 +1,28 @@ +name: Upload to PIP + +on: + release: + types: [created] + # Allows for manual triggering + workflow_dispatch: + +jobs: + upload: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: "Installs dependencies" + run: | + python3 -m pip install --upgrade pip + python3 -m pip install setuptools wheel twine + - name: "Builds and uploads to PyPI" + run: | + python3 setup.py sdist bdist_wheel + python3 -m twine upload --verbose dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }}