diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b60dc41..d3375cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,15 +1,61 @@ -name: Publish to PyPI +name: Publishing to Pypi on: release: types: [published] jobs: - build: + test: + name: Test runs-on: ubuntu-latest + strategy: + matrix: + python-version: + [ + "3.8", + "3.9", + "3.10" + ] + steps: + - uses: actions/checkout@v2 - - name: Publish a Python distribution to PyPI + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -e ".[test]" + - name: Run Tests + run: | + pytest + build-n-publish: + name: Build and publish + needs: [test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + - name: Publish distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/setup.py b/setup.py index c85ecc2..beef9c1 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setuptools.setup( name="kkiapay", - version="0.0.5", + version="0.0.6", author="Junior Gantin", author_email="nioperas06@gmail.com", description="Community-driven Admin KkiaPay Sdk for Python",