diff --git a/.github/workflows/publish_alpha_release.yml b/.github/workflows/publish_alpha_release.yml index f23277d..5ef507b 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,34 @@ jobs: with: commit_message: Update Changelog repository: action/package/ + update_skill_json: + if: ${{ always() && inputs.update_skill_json }} + needs: + - bump_version + - update_changelog + uses: NeonGeckoCom/.github/.github/workflows/skill_update_json_spec.yml@master + with: + branch: ${{ inputs.branch }} 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 @@ -168,11 +180,12 @@ jobs: needs: - update_changelog - bump_version + - update_skill_json if: ${{ always() && inputs.publish_prerelease }} 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 +196,4 @@ jobs: tag: ${{needs.bump_version.outputs.version}} commit: ${{ github.ref }} prerelease: true - generateReleaseNotes: true \ No newline at end of file + generateReleaseNotes: true diff --git a/.github/workflows/skill_update_json_spec.yml b/.github/workflows/skill_update_json_spec.yml index 45044c2..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: @@ -29,8 +33,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: