Repository: OpenVoiceOS/ovos_skill_manager (language: python)

Issue:
Update GH Automation to shared actions
Updates automation to shared workflows and resolves failing license tests (i.e. https://github.com/OpenVoiceOS/ovos_skill_manager/pull/115)


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/propose_release.yml b/.github/workflows/propose_release.yml
index 26e4cc6..ab12686 100644
--- a/.github/workflows/propose_release.yml
+++ b/.github/workflows/propose_release.yml
@@ -6,21 +6,27 @@ on:
         type: choice
         description: Release Type
         options:
-          - patch
+          - build
           - minor
           - major
 jobs:
   update_version:
     uses: neongeckocom/.github/.github/workflows/propose_semver_release.yml@master
     with:
-      branch: dev
       release_type: ${{ inputs.release_type }}
+      version_file: ovos_skills_manager/version.py
+      alpha_var: VERSION_ALPHA
+      build_var: VERSION_BUILD
+      minor_var: VERSION_MINOR
+      major_var: VERSION_MAJOR
       update_changelog: True
+      branch: dev
+
   pull_changes:
-    uses: neongeckocom/.github/.github/workflows/pull_master.yml@master
     needs: update_version
+    uses: neongeckocom/.github/.github/workflows/pull_master.yml@master
     with:
       pr_assignee: ${{ github.actor }}
       pr_draft: false
       pr_title: ${{ needs.update_version.outputs.version }}
-      pr_body: ${{ needs.update_version.outputs.changelog }}
\ No newline at end of file
+      pr_body: ${{ needs.update_version.outputs.changelog }}
diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml
index e4b3fa3..c86812b 100644
--- a/.github/workflows/publish_release.yml
+++ b/.github/workflows/publish_release.yml
@@ -9,4 +9,5 @@ on:
 jobs:
   build_and_publish_pypi_and_release:
     uses: neongeckocom/.github/.github/workflows/publish_stable_release.yml@master
-    secrets: inherit
+    secrets:
+      PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
diff --git a/scripts/bump_alpha.py b/scripts/bump_alpha.py
deleted file mode 100644
index 68db0bd..0000000
--- a/scripts/bump_alpha.py
+++ /dev/null
@@ -1,18 +0,0 @@
-import fileinput
-from os.path import join, dirname
-
-
-version_file = join(dirname(dirname(__file__)), "ovos_skills_manager", "version.py")
-version_var_name = "VERSION_ALPHA"
-
-with open(version_file, "r", encoding="utf-8") as v:
-    for line in v.readlines():
-        if line.startswith(version_var_name):
-            version = int(line.split("=")[-1])
-            new_version = int(version) + 1
-
-for line in fileinput.input(version_file, inplace=True):
-    if line.startswith(version_var_name):
-        print(f"{version_var_name} = {new_version}")
-    else:
-        print(line.rstrip('\n'))
diff --git a/scripts/bump_build.py b/scripts/bump_build.py
deleted file mode 100644
index 80e168d..0000000
--- a/scripts/bump_build.py
+++ /dev/null
@@ -1,21 +0,0 @@
-import fileinput
-from os.path import join, dirname
-
-
-version_file = join(dirname(dirname(__file__)), "ovos_skills_manager", "version.py")
-version_var_name = "VERSION_BUILD"
-alpha_var_name = "VERSION_ALPHA"
-
-with open(version_file, "r", encoding="utf-8") as v:
-    for line in v.readlines():
-        if line.startswith(version_var_name):
-            version = int(line.split("=")[-1])
-            new_version = int(version) + 1
-
-for line in fileinput.input(version_file, inplace=True):
-    if line.startswith(version_var_name):
-        print(f"{version_var_name} = {new_version}")
-    elif line.startswith(alpha_var_name):
-        print(f"{alpha_var_name} = 0")
-    else:
-        print(line.rstrip('\n'))
diff --git a/scripts/bump_major.py b/scripts/bump_major.py
deleted file mode 100644
index ff5805d..0000000
--- a/scripts/bump_major.py
+++ /dev/null
@@ -1,27 +0,0 @@
-import fileinput
-from os.path import join, dirname
-
-
-version_file = join(dirname(dirname(__file__)), "ovos_skills_manager", "version.py")
-version_var_name = "VERSION_MAJOR"
-minor_var_name = "VERSION_MINOR"
-build_var_name = "VERSION_BUILD"
-alpha_var_name = "VERSION_ALPHA"
-
-with open(version_file, "r", encoding="utf-8") as v:
-    for line in v.readlines():
-        if line.startswith(version_var_name):
-            version = int(line.split("=")[-1])
-            new_version = int(version) + 1
-
-for line in fileinput.input(version_file, inplace=True):
-    if line.startswith(version_var_name):
-        print(f"{version_var_name} = {new_version}")
-    elif line.startswith(minor_var_name):
-        print(f"{minor_var_name} = 0")
-    elif line.startswith(build_var_name):
-        print(f"{build_var_name} = 0")
-    elif line.startswith(alpha_var_name):
-        print(f"{alpha_var_name} = 0")
-    else:
-        print(line.rstrip('\n'))
diff --git a/scripts/bump_minor.py b/scripts/bump_minor.py
deleted file mode 100644
index ccfe961..0000000
--- a/scripts/bump_minor.py
+++ /dev/null
@@ -1,24 +0,0 @@
-import fileinput
-from os.path import join, dirname
-
-
-version_file = join(dirname(dirname(__file__)), "ovos_skills_manager", "version.py")
-version_var_name = "VERSION_MINOR"
-build_var_name = "VERSION_BUILD"
-alpha_var_name = "VERSION_ALPHA"
-
-with open(version_file, "r", encoding="utf-8") as v:
-    for line in v.readlines():
-        if line.startswith(version_var_name):
-            version = int(line.split("=")[-1])
-            new_version = int(version) + 1
-
-for line in fileinput.input(version_file, inplace=True):
-    if line.startswith(version_var_name):
-        print(f"{version_var_name} = {new_version}")
-    elif line.startswith(build_var_name):
-        print(f"{build_var_name} = 0")
-    elif line.startswith(alpha_var_name):
-        print(f"{alpha_var_name} = 0")
-    else:
-        print(line.rstrip('\n'))
diff --git a/scripts/remove_alpha.py b/scripts/remove_alpha.py
deleted file mode 100644
index cadb2f9..0000000
--- a/scripts/remove_alpha.py
+++ /dev/null
@@ -1,13 +0,0 @@
-import fileinput
-from os.path import join, dirname
-
-
-version_file = join(dirname(dirname(__file__)), "ovos_skills_manager", "version.py")
-
-alpha_var_name = "VERSION_ALPHA"
-
-for line in fileinput.input(version_file, inplace=True):
-    if line.startswith(alpha_var_name):
-        print(f"{alpha_var_name} = 0")
-    else:
-        print(line.rstrip('\n'))


Test patch:
diff --git a/.github/workflows/publish_test_build.yml b/.github/workflows/publish_test_build.yml
index d9a2281..8943d32 100644
--- a/.github/workflows/publish_test_build.yml
+++ b/.github/workflows/publish_test_build.yml
@@ -1,18 +1,31 @@
 # This workflow will generate a distribution and upload it to PyPI
 
-name: Publish Alpha Build
+name: Publish Alpha Build ...aX
 on:
   push:
     branches:
       - dev
     paths-ignore:
       - 'ovos_skills_manager/version.py'
+      - 'test/**'
+      - '.github/**'
+      - '.gitignore'
+      - 'LICENSE'
+      - 'CHANGELOG.md'
+      - 'MANIFEST.in'
+      - 'Readme.md'
+  workflow_dispatch:
 
 jobs:
   publish_alpha_release:
     uses: neongeckocom/.github/.github/workflows/publish_alpha_release.yml@master
-    secrets: inherit
+    secrets:
+      PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
     with:
       version_file: "ovos_skills_manager/version.py"
       publish_prerelease: true
-      update_changelog: true
\ No newline at end of file
+      update_changelog: true
+      alpha_var: VERSION_ALPHA
+      build_var: VERSION_BUILD
+      minor_var: VERSION_MINOR
+      major_var: VERSION_MAJOR
\ No newline at end of file
diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml
index 905fe5f..0b02718 100644
--- a/.github/workflows/unit_tests.yml
+++ b/.github/workflows/unit_tests.yml
@@ -14,8 +14,7 @@ on:
       - 'LICENSE'
       - 'CHANGELOG.md'
       - 'MANIFEST.in'
-      - 'readme.md'
-      - 'scripts/**'
+      - 'Readme.md'
   push:
     branches:
       - master
@@ -28,8 +27,7 @@ on:
       - 'LICENSE'
       - 'CHANGELOG.md'
       - 'MANIFEST.in'
-      - 'readme.md'
-      - 'scripts/**'
+      - 'Readme.md'
   workflow_dispatch:
 
 jobs: