From 373a5a1f03b0125afd9bc4acaedb4a9aba0b59bd Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 10 Sep 2025 12:57:26 -0700 Subject: [PATCH 1/6] Update to use new neon-utils method --- .github/workflows/skill_update_json_spec.yml | 2 -- requirements/update_skill_json.txt | 5 +++-- scripts/update_skill_json.py | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/skill_update_json_spec.yml b/.github/workflows/skill_update_json_spec.yml index 45044c2..7f1e0c4 100644 --- a/.github/workflows/skill_update_json_spec.yml +++ b/.github/workflows/skill_update_json_spec.yml @@ -29,8 +29,6 @@ jobs: sudo apt update sudo apt install -y gcc git libpulse-dev pip install --upgrade pip - pip install wheel "cython<3.0.0" # TODO: cython patching https://github.com/yaml/pyyaml/issues/724 - pip install --no-build-isolation pyyaml~=5.4 # TODO: patching https://github.com/yaml/pyyaml/issues/724 pip install -r action/github/requirements/update_skill_json.txt - name: Get Updated skill.json run: | diff --git a/requirements/update_skill_json.txt b/requirements/update_skill_json.txt index a5110a0..f3ae050 100644 --- a/requirements/update_skill_json.txt +++ b/requirements/update_skill_json.txt @@ -1,4 +1,5 @@ -neon-utils~=1.2 +#neon-utils~=1.2 +neon-utils[skills] @ git+https://github.com/neongeckocom/neon-utils@REF_RemoveOsmDependency#egg=neon-utils ovos-skills-manager~=0.0 cattrs != 23.1.0 -# TODO: cattrs patching https://github.com/python-attrs/cattrs/issues/369 \ No newline at end of file +# TODO: cattrs patching https://github.com/python-attrs/cattrs/issues/369 diff --git a/scripts/update_skill_json.py b/scripts/update_skill_json.py index baf4d1f..498325f 100644 --- a/scripts/update_skill_json.py +++ b/scripts/update_skill_json.py @@ -31,13 +31,13 @@ from sys import argv from os.path import join from pprint import pprint -from neon_utils.packaging_utils import build_skill_spec +from neon_utils.skill_utils import get_skill_metadata def get_skill_json(skill_dir: str): print(f"skill_dir={skill_dir}") skill_json = join(skill_dir, "skill.json") - skill_spec = build_skill_spec(skill_dir) + skill_spec = get_skill_metadata(skill_dir) pprint(skill_spec) try: with open(skill_json) as f: From 92b3b3a6744ca1dcb2df47bbb1784d6274956bd4 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 10 Sep 2025 13:15:27 -0700 Subject: [PATCH 2/6] Update `publish_alpha_release` to support skill.json updates --- .github/workflows/publish_alpha_release.yml | 33 +++++++++++++++------ 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish_alpha_release.yml b/.github/workflows/publish_alpha_release.yml index f23277d..4745471 100644 --- a/.github/workflows/publish_alpha_release.yml +++ b/.github/workflows/publish_alpha_release.yml @@ -26,6 +26,9 @@ on: publish_pypi: type: boolean default: True + update_skill_json: + type: boolean + default: False version_scheme: type: string default: semver @@ -64,17 +67,17 @@ jobs: version: ${{ steps.version.outputs.version }} steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ inputs.branch }} path: action/package/ - name: Checkout Scripts Repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: path: action/github/ repository: NeonGeckoCom/.github - name: Setup Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: "3.10" - name: Increment Alpha Version @@ -106,7 +109,7 @@ jobs: changelog: ${{ steps.changelog.outputs.changelog }} steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ inputs.branch }} path: action/package/ @@ -131,25 +134,37 @@ jobs: with: commit_message: Update Changelog repository: action/package/ + update_skill_json: + if: ${{ always() && inputs.update_skill_json }} + runs-on: ${{inputs.runner}} + needs: + - bump_version + - update_changelog + steps: + - name: Update skill.json + uses: NeonGeckoCom/.github/.github/workflows/skill_update_json_spec.yml@master + - name: Update skill index + uses: NeonGeckoCom/.github/.github/workflows/skill_update_meta_repo.yml@master build_and_publish_pypi: if: ${{ always() && inputs.publish_pypi }} needs: + - update_skill_json - update_changelog - bump_version runs-on: ${{inputs.runner}} steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ inputs.branch }} path: action/package/ - name: Checkout Scripts Repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: path: action/github/ repository: NeonGeckoCom/.github - name: Setup Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: "3.10" - name: Install Build Tools @@ -172,7 +187,7 @@ jobs: runs-on: ${{inputs.runner}} steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ inputs.branch }} path: action/package/ @@ -183,4 +198,4 @@ jobs: tag: ${{needs.bump_version.outputs.version}} commit: ${{ github.ref }} prerelease: true - generateReleaseNotes: true \ No newline at end of file + generateReleaseNotes: true From 8785ee414e7cbd4625beba3ad02873350cdd2107 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 10 Sep 2025 13:25:50 -0700 Subject: [PATCH 3/6] Use branch ref to test new skill.json action --- .github/workflows/publish_alpha_release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_alpha_release.yml b/.github/workflows/publish_alpha_release.yml index 4745471..cc255d6 100644 --- a/.github/workflows/publish_alpha_release.yml +++ b/.github/workflows/publish_alpha_release.yml @@ -142,9 +142,11 @@ jobs: - update_changelog steps: - name: Update skill.json - uses: NeonGeckoCom/.github/.github/workflows/skill_update_json_spec.yml@master + uses: NeonGeckoCom/.github/.github/workflows/skill_update_json_spec.yml@FEAT_UpdateSkillJsonAction + # TODO: Revert above to `master` - name: Update skill index - uses: NeonGeckoCom/.github/.github/workflows/skill_update_meta_repo.yml@master + uses: NeonGeckoCom/.github/.github/workflows/skill_update_meta_repo.yml@FEAT_UpdateSkillJsonAction + # TODO: Revert above to `master` build_and_publish_pypi: if: ${{ always() && inputs.publish_pypi }} needs: From e8c994a2cf2782fa29af30d39229b46aa6717cf4 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 10 Sep 2025 13:40:05 -0700 Subject: [PATCH 4/6] Fix GHA syntax error in `publish_alpha_release.yml` --- .github/workflows/publish_alpha_release.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish_alpha_release.yml b/.github/workflows/publish_alpha_release.yml index cc255d6..191c325 100644 --- a/.github/workflows/publish_alpha_release.yml +++ b/.github/workflows/publish_alpha_release.yml @@ -136,17 +136,11 @@ jobs: repository: action/package/ update_skill_json: if: ${{ always() && inputs.update_skill_json }} - runs-on: ${{inputs.runner}} needs: - bump_version - update_changelog - steps: - - name: Update skill.json - uses: NeonGeckoCom/.github/.github/workflows/skill_update_json_spec.yml@FEAT_UpdateSkillJsonAction - # TODO: Revert above to `master` - - name: Update skill index - uses: NeonGeckoCom/.github/.github/workflows/skill_update_meta_repo.yml@FEAT_UpdateSkillJsonAction - # TODO: Revert above to `master` + uses: NeonGeckoCom/.github/.github/workflows/skill_update_json_spec.yml@FEAT_UpdateSkillJsonAction + # TODO: Revert above to `master` build_and_publish_pypi: if: ${{ always() && inputs.publish_pypi }} needs: From 50ed85b0a55c1baae4d775c1ba7ff0e937cc1940 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 10 Sep 2025 13:45:34 -0700 Subject: [PATCH 5/6] Fix ref used for branch checkout --- .github/workflows/publish_alpha_release.yml | 3 +++ .github/workflows/skill_update_json_spec.yml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/publish_alpha_release.yml b/.github/workflows/publish_alpha_release.yml index 191c325..ce50a7f 100644 --- a/.github/workflows/publish_alpha_release.yml +++ b/.github/workflows/publish_alpha_release.yml @@ -141,6 +141,8 @@ jobs: - update_changelog uses: NeonGeckoCom/.github/.github/workflows/skill_update_json_spec.yml@FEAT_UpdateSkillJsonAction # TODO: Revert above to `master` + with: + branch: ${{ inputs.branch }} build_and_publish_pypi: if: ${{ always() && inputs.publish_pypi }} needs: @@ -179,6 +181,7 @@ jobs: needs: - update_changelog - bump_version + - update_skill_json if: ${{ always() && inputs.publish_prerelease }} runs-on: ${{inputs.runner}} steps: diff --git a/.github/workflows/skill_update_json_spec.yml b/.github/workflows/skill_update_json_spec.yml index 7f1e0c4..e838d78 100644 --- a/.github/workflows/skill_update_json_spec.yml +++ b/.github/workflows/skill_update_json_spec.yml @@ -5,6 +5,9 @@ on: runner: type: string default: "ubuntu-latest" + branch: + type: string + default: ${{ github.ref }} jobs: update_skill_json: @@ -15,6 +18,7 @@ jobs: uses: actions/checkout@v4 with: path: action/skill/ + ref: ${{ inputs.branch }} - name: Checkout Scripts Repo uses: actions/checkout@v4 with: From e943960e53f902f9d4f06d280efc52f703403f20 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 10 Sep 2025 13:56:15 -0700 Subject: [PATCH 6/6] Update to default branch in `skill_update_json_spec` action --- .github/workflows/publish_alpha_release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish_alpha_release.yml b/.github/workflows/publish_alpha_release.yml index ce50a7f..5ef507b 100644 --- a/.github/workflows/publish_alpha_release.yml +++ b/.github/workflows/publish_alpha_release.yml @@ -139,8 +139,7 @@ jobs: needs: - bump_version - update_changelog - uses: NeonGeckoCom/.github/.github/workflows/skill_update_json_spec.yml@FEAT_UpdateSkillJsonAction - # TODO: Revert above to `master` + uses: NeonGeckoCom/.github/.github/workflows/skill_update_json_spec.yml@master with: branch: ${{ inputs.branch }} build_and_publish_pypi: