Repository: iterative/gto (language: python)

Issue:
Set up release on PyPi



Discussion / hints:

Fix patch:
diff --git a/setup.py b/setup.py
index a6cf78c3..ac8e074e 100644
--- a/setup.py
+++ b/setup.py
@@ -29,8 +29,8 @@
 
 
 setup_args = dict(  # noqa: C408
-    name="gto",
-    version="0.0.2",
+    name="great-tool-ops",
+    version="0.0.3",
     description="Version and deploy your models following GitOps principles",
     long_description=(Path(__file__).parent / "README.md").read_text(encoding="utf8"),
     author="Alexander Guschin",


Test patch:
diff --git a/.github/workflows/check-test-release.yml b/.github/workflows/check-test-release.yml
index 1101e2cf..b939f851 100644
--- a/.github/workflows/check-test-release.yml
+++ b/.github/workflows/check-test-release.yml
@@ -76,3 +76,33 @@ jobs:
       with:
         fail_ci_if_error: false
         token: ${{ secrets.CODECOV_TOKEN }}
+  deploy:
+    name: PyPI Deploy
+    needs: [check, test]
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+      with:
+        fetch-depth: 0
+    - uses: actions/setup-python@v2
+    - id: dist
+      uses: casperdcl/deploy-pypi@v2
+      with:
+        build: true
+        password: ${{ secrets.PYPI_TOKEN }}
+        upload: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
+    - id: meta
+      name: Changelog
+      run: |
+        echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
+        git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD > _CHANGES.md
+    - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
+      uses: softprops/action-gh-release@v1
+      env:
+        GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
+      with:
+        name: tpi ${{ steps.meta.outputs.tag }} alpha
+        body_path: _CHANGES.md
+        draft: true
+        files: |
+          dist/${{ steps.dist.outputs.whl }}