Repository: A1fus/csv-parakeet (language: python)

Issue:
Run tests only on pull request and only when changes to python files
[reference](https://stackoverflow.com/questions/63822219/how-to-run-github-actions-workflow-only-if-the-pushed-files-are-in-a-specific-fo)


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
new file mode 100644
index 0000000..6d27d30
--- /dev/null
+++ b/.github/workflows/release.yaml
@@ -0,0 +1,16 @@
+name: Release
+on:
+  release:
+    types: [published]
+jobs:
+  release:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v3
+    - uses: actions/setup-python@v4
+      with:
+        python-version: 3.10.11
+        architecture: x64
+    - run: pip install poetry==1.4.2
+    - run: poetry build
+    - run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }}


Test patch:
diff --git a/.github/workflows/test-pypi.yaml b/.github/workflows/test-pypi.yaml
index 7d107c3..11d11dd 100644
--- a/.github/workflows/test-pypi.yaml
+++ b/.github/workflows/test-pypi.yaml
@@ -12,11 +12,11 @@ jobs:
       with:
         python-version: 3.10.11
         architecture: x64
-    - run: pip install poetry==1.4.1
+    - run: pip install poetry==1.4.2
     - run: >-
-        poetry version patch &&
+        poetry version prepatch &&
         version=$(poetry version | awk '{print $2}') &&
-        poetry version $version.dev.$(date +%s)
+        poetry version $version+$(date +%s)
     - run: poetry build
     - uses: pypa/gh-action-pypi-publish@release/v1
       with:
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 1897afd..4ef68a1 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -1,5 +1,10 @@
 name: Tests
-on: push
+on:
+  pull_request:
+    branches:
+      - main
+    paths:
+      - '**.py'
 jobs:
   tests:
     runs-on: ubuntu-latest