Repository: YuviGold/mercado (language: python)

Issue:
Publish package on pypi
Make a CD job that will create the artifact (`make dist`) and will push the package to https://pypi.org/


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
new file mode 100644
index 0000000..e05a0ce
--- /dev/null
+++ b/.github/workflows/release.yaml
@@ -0,0 +1,19 @@
+name: Release
+on:
+  push:
+    tags:
+      - '*'
+
+jobs:
+  deploy:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v3
+    - uses: actions/setup-python@v4
+      with:
+        python-version: '3.10'
+    - run: python -m pip install -r dev-requirements.txt -r requirements.txt
+    - run: make deploy
+      env:
+        TWINE_USERNAME: __token__
+        TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
diff --git a/Makefile b/Makefile
index c5d52bb..8d73c87 100644
--- a/Makefile
+++ b/Makefile
@@ -19,5 +19,8 @@ install: clean dist
 dist:
 	./setup.py bdist_wheel
 
+deploy: dist
+	python -m twine upload --verbose dist/*
+
 clean:
 	-rm -rf dist build *.egg-info
diff --git a/dev-requirements.txt b/dev-requirements.txt
index 247b17f..1f638a6 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -1,14 +1,41 @@
 attrs==22.1.0
 autopep8==1.7.0
+bleach==5.0.1
+certifi==2022.9.24
+cffi==1.15.1
+charset-normalizer==2.1.1
+commonmark==0.9.1
+cryptography==38.0.1
+docutils==0.19
 flake8==5.0.4
+idna==3.4
+importlib-metadata==5.0.0
 iniconfig==1.1.1
+jaraco.classes==3.2.3
+jeepney==0.8.0
+keyring==23.9.3
 mccabe==0.7.0
+more-itertools==9.0.0
 packaging==21.3
+pkginfo==1.8.3
 pluggy==1.0.0
 py==1.11.0
 pycodestyle==2.9.1
+pycparser==2.21
 pyflakes==2.5.0
+Pygments==2.13.0
 pyparsing==3.0.9
 pytest==7.1.3
+readme-renderer==37.2
+requests==2.28.1
+requests-toolbelt==0.10.0
+rfc3986==2.0.0
+rich==12.6.0
+SecretStorage==3.3.3
+six==1.16.0
 toml==0.10.2
 tomli==2.0.1
+twine==4.0.1
+urllib3==1.26.12
+webencodings==0.5.1
+zipp==3.9.0
diff --git a/setup.py b/setup.py
index 3aaf11a..3fe1285 100755
--- a/setup.py
+++ b/setup.py
@@ -6,11 +6,13 @@
     requirements = f.read().splitlines()
 
 setup(name='mercado',
-      version='0.1',
+      version='0.1.1',
       description='Open Source market for utilities',
       author='YuviGold',
+      url='https://github.com/YuviGold/mercado/',
       packages=find_packages(),
       install_requires=requirements,
+      setup_requires=['wheel'],
       entry_points={
           'console_scripts': ['mercado=mercado.cli:main']
       }


Test patch:
diff --git a/.github/workflows/github-action-test.yaml b/.github/workflows/github-action-test.yaml
index 6fa97b8..6bfffca 100644
--- a/.github/workflows/github-action-test.yaml
+++ b/.github/workflows/github-action-test.yaml
@@ -1,5 +1,7 @@
 name: Test
-on: [push]
+
+on: [push, pull_request]
+
 jobs:
   lint:
     runs-on: ubuntu-latest
@@ -7,7 +9,7 @@ jobs:
       - uses: actions/checkout@v3
       - uses: actions/setup-python@v4
         with:
-          python-version: '3.10' 
+          python-version: '3.10'
       - run: python -m pip install -r dev-requirements.txt -r requirements.txt
       - run: make lint
   test:
@@ -16,7 +18,7 @@ jobs:
       - uses: actions/checkout@v3
       - uses: actions/setup-python@v4
         with:
-          python-version: '3.10' 
+          python-version: '3.10'
       - run: python -m pip install -r dev-requirements.txt -r requirements.txt
       - run: make test