Repository: GispoCoding/qgis_plugin_tools (language: python)

Issue:
Build automatic releases with PRs
After merging PR, remove releases


Discussion / hints:
It would be great to have one development release after commits (merges) to the main branch.

Fix patch:
diff --git a/infrastructure/plugin_creator.py b/infrastructure/plugin_creator.py
index ffd5a2d..36c8975 100644
--- a/infrastructure/plugin_creator.py
+++ b/infrastructure/plugin_creator.py
@@ -27,6 +27,7 @@
     "CHANGELOG.md",
     ".github/workflows/tests.yml",
     ".github/workflows/tests_ltr.yml",
+    ".github/workflows/windows_tests.yml",
     ".github/workflows/release.yml",
     ".github/workflows/pre-commit.yml",
     ".github/ISSUE_TEMPLATE/bug_report.md",
diff --git a/infrastructure/template/root/README.md b/infrastructure/template/root/README.md
index 4dd4b75..1c18b2f 100644
--- a/infrastructure/template/root/README.md
+++ b/infrastructure/template/root/README.md
@@ -1,13 +1,13 @@
 # <plugin_name>
 ![tests](https://github.com/<organization>/<repo>/workflows/Tests/badge.svg)
 ![testsltr](https://github.com/<organization>/<repo>/workflows/TestsLTR/badge.svg)
+![windows tests](https://github.com/<organization>/<repo>/workflows/Windows%20Tests/badge.svg)
 ![release](https://github.com/<organization>/<repo>/workflows/Release/badge.svg)
 [![codecov.io](https://codecov.io/github/<organization>/<repo>/coverage.svg?branch=master)](https://codecov.io/github/<organization>/<repo>?branch=master)
 [![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)
 [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
 
 ### Development
-
 Refer to [development](docs/development.md) for developing this QGIS3 plugin.
 
 ## License


Test patch:
diff --git a/infrastructure/template/root/.github/workflows/windows_tests.yml b/infrastructure/template/root/.github/workflows/windows_tests.yml
new file mode 100644
index 0000000..6f01118
--- /dev/null
+++ b/infrastructure/template/root/.github/workflows/windows_tests.yml
@@ -0,0 +1,37 @@
+# workflow name
+name: Windows Tests
+
+# Controls when the action will run. Triggers the workflow on push or pull request
+# events but only for the wanted branches
+on:
+  push:
+    branches:
+      - master
+      - main
+  pull_request:
+    branches:
+      - master
+      - main
+
+jobs:
+  windows_tests:
+    runs-on: windows-latest
+
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+
+      - name: Choco install qgis
+        uses: crazy-max/ghaction-chocolatey@v1
+        with:
+          args: install qgis-ltr -y
+
+      # If QGIS ltr version is different that 3.16, change the path accordingly
+      - name: Run tests
+        shell: pwsh
+        run: |
+          $env:PATH="C:\Program Files\QGIS 3.16\bin;$env:PATH"
+          $env:QGIS_PLUGIN_IN_CI=1
+          python-qgis-ltr.bat -m pip install -q pytest
+          python-qgis-ltr.bat -m pytest -v