Reorganize workflows to two groups: on every push, or weekly.
diff --git a/.github/workflows/binary_packages.yml b/.github/workflows/binary_packages.yml
index 501e85a..a19ab38 100644
--- a/.github/workflows/binary_packages.yml
+++ b/.github/workflows/binary_packages.yml
@@ -2,7 +2,7 @@
 
 on:
   workflow_dispatch:
-  push:
+  workflow_call:
 
 jobs:
   build_linux:
@@ -27,6 +27,10 @@
           git clean -dxf
           tools/make_linux_package.sh
 
+      - name: Fingerprint binary
+        run: |
+          openssl sha256 nanopb/dist/*.tar.gz
+
       - name: Upload binary
         uses: actions/upload-artifact@v2
         with:
@@ -72,6 +76,10 @@
           git clean -dxf
           tools/make_windows_package.sh
 
+      - name: Fingerprint binary
+        run: |
+          openssl sha256 nanopb/dist/*.zip
+
       - name: Upload binary
         uses: actions/upload-artifact@v2
         with:
@@ -108,6 +116,10 @@
           git clean -dxf
           tools/make_mac_package.sh
 
+      - name: Fingerprint binary
+        run: |
+          openssl sha256 nanopb/dist/*.tar.gz
+
       - name: Upload binary
         uses: actions/upload-artifact@v2
         with:
diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml
index e67e68f..b4f6c48 100644
--- a/.github/workflows/cifuzz.yml
+++ b/.github/workflows/cifuzz.yml
@@ -1,17 +1,7 @@
-name: CIFuzz
+name: Run CIFuzz fuzz test for 10 minutes
 on:
-  push:
-    branches:
-      - master
-    paths:
-      - '**.c'
-      - '**.h'
-  pull_request:
-    branches:
-      - master
-    paths:
-      - '**.c'
-      - '**.h'
+  workflow_dispatch:
+  workflow_call:
 
 jobs:
   Fuzzing:
diff --git a/.github/workflows/compiler_tests.yml b/.github/workflows/compiler_tests.yml
index b464ec5..cfdc63b 100644
--- a/.github/workflows/compiler_tests.yml
+++ b/.github/workflows/compiler_tests.yml
@@ -2,7 +2,7 @@
 
 on:
   workflow_dispatch:
-  push:
+  workflow_call:
 
 jobs:
   test_linux:
diff --git a/.github/workflows/ios_swift.yml b/.github/workflows/ios_swift_tests.yml
similarity index 69%
rename from .github/workflows/ios_swift.yml
rename to .github/workflows/ios_swift_tests.yml
index aad0389..42c022a 100644
--- a/.github/workflows/ios_swift.yml
+++ b/.github/workflows/ios_swift_tests.yml
@@ -1,8 +1,8 @@
-name: Apple iOS swift
+name: Build and test for Apple iOS swift
 
 on:
-  push:
-  pull_request:
+  workflow_dispatch:
+  workflow_call:
 
 jobs:
   swift-build-run:
diff --git a/.github/workflows/platformio.yaml b/.github/workflows/platformio_tests.yml
similarity index 92%
rename from .github/workflows/platformio.yaml
rename to .github/workflows/platformio_tests.yml
index 6390fbf..6c52ccd 100644
--- a/.github/workflows/platformio.yaml
+++ b/.github/workflows/platformio_tests.yml
@@ -1,15 +1,15 @@
-name: platformio
+name: Build and test using platformio
 
 on:
-  push:
-  pull_request:
+  workflow_dispatch:
+  workflow_call:
 
 jobs:
   platformio:
     name: Build and run PlatformIO example
     runs-on: ubuntu-latest
     steps:
-      - name: ⤵️ Check out code from GitHub
+      - name: Check out code from GitHub
         uses: actions/checkout@v2
         with:
           path: nanopb
diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml
new file mode 100644
index 0000000..3fc812c
--- /dev/null
+++ b/.github/workflows/pypi_publish.yml
@@ -0,0 +1,37 @@
+name: Publish generator package to PyPI / pip
+
+on:
+  workflow_dispatch:
+  workflow_call:
+
+jobs:
+  publish_pypi:
+    name: Build and publish pypi package on Ubuntu 20.04
+    runs-on: ubuntu-20.04
+
+    steps:
+      - name: Check out code from GitHub
+        uses: actions/checkout@v2
+        with:
+          path: nanopb
+          fetch-depth: "0"
+
+      - name: Install dependencies
+        run: |
+          python3 -m pip install --user --upgrade scons protobuf grpcio-tools pyinstaller
+      
+      - name: Build PyPI package
+        run: |
+          cd nanopb/extra/poetry
+          ./poetry_build.sh
+
+      - name: Fingerprint package
+        run: |
+          openssl sha256 nanopb/extra/poetry/dist/*.whl
+      
+      - name: Publish PyPI package
+        env:
+          PYPI_API_KEY: ${{ secrets.PYPI_API_KEY }}
+        run: |
+          cd nanopb/extra/poetry/build
+          poetry publish -n -u __token__ -p $PYPI_API_KEY
diff --git a/.github/workflows/python2_tests.yml b/.github/workflows/python2_tests.yml
index a75d7c4..fdd39fd 100644
--- a/.github/workflows/python2_tests.yml
+++ b/.github/workflows/python2_tests.yml
@@ -2,7 +2,7 @@
 
 on:
   workflow_dispatch:
-  push:
+  workflow_call:
 
 jobs:
   test_python2:
diff --git a/.github/workflows/simulator_tests.yml b/.github/workflows/simulator_tests.yml
index 5497139..67b1ffb 100644
--- a/.github/workflows/simulator_tests.yml
+++ b/.github/workflows/simulator_tests.yml
@@ -2,7 +2,7 @@
 
 on:
   workflow_dispatch:
-  push:
+  workflow_call:
 
 jobs:
   test_avr:
diff --git a/.github/workflows/trigger_on_code_change.yml b/.github/workflows/trigger_on_code_change.yml
new file mode 100644
index 0000000..38fcdf0
--- /dev/null
+++ b/.github/workflows/trigger_on_code_change.yml
@@ -0,0 +1,41 @@
+name: Test after any code changes
+on:
+  push:
+    paths:
+      - '**.c'
+      - '**.h'
+      - '**.py'
+  pull_request:
+    paths:
+      - '**.c'
+      - '**.h'
+      - '**.py'
+
+jobs:
+  smoke_test:
+    name: Run test suite on Ubuntu 20.04
+    runs-on: ubuntu-20.04
+
+    steps:
+      - name: Check out code from GitHub
+        uses: actions/checkout@v2
+        with:
+          path: nanopb
+
+      - name: Install dependencies
+        run: |
+          apt-get install python3-protobuf protobuf-compiler splint valgrind
+
+      - name: Run tests
+        run: |
+          cd nanopb/tests
+          scons
+  
+  fuzz_tests:
+    needs: smoke_test
+    uses: ./.github/workflows/cifuzz.yml
+  
+  binary_builds:
+    needs: smoke_test
+    uses: ./.github/workflows/binary_packages.yml
+
diff --git a/.github/workflows/trigger_on_schedule.yml b/.github/workflows/trigger_on_schedule.yml
new file mode 100644
index 0000000..8af637b
--- /dev/null
+++ b/.github/workflows/trigger_on_schedule.yml
@@ -0,0 +1,33 @@
+name: Test, build and pre-release weekly
+on:
+  workflow_dispatch:
+  schedule:
+    - cron: '32 1 * * 1'
+
+jobs:
+  compiler_tests:
+    uses: ./.github/workflows/compiler_tests.yml
+  
+  simulator_tests:
+    uses: ./.github/workflows/simulator_tests.yml
+  
+  python2_tests:
+    uses: ./.github/workflows/python2_tests.yml
+  
+  ios_swift_tests:
+    uses: ./.github/workflows/ios_swift_tests.yml
+  
+  platformio_tests:
+    uses: ./.github/workflows/platformio_tests.yml
+  
+  cifuzz:
+    uses: ./.github/workflows/cifuzz.yml
+  
+  binary_packages:
+    needs: [compiler_tests, simulator_tests, python2_tests, ios_swift_tests, platformio_tests, cifuzz]
+    uses: ./.github/workflows/binary_packages.yml
+
+  pypi_publish:
+    needs: binary_packages
+    uses: ./.github/workflows/pypi_publish.yml
+