Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions .github/workflows/publish_alpha_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ on:
publish_pypi:
type: boolean
default: True
update_skill_json:
type: boolean
default: False
version_scheme:
type: string
default: semver
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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/
Expand All @@ -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
Expand All @@ -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/
Expand All @@ -183,4 +196,4 @@ jobs:
tag: ${{needs.bump_version.outputs.version}}
commit: ${{ github.ref }}
prerelease: true
generateReleaseNotes: true
generateReleaseNotes: true
6 changes: 4 additions & 2 deletions .github/workflows/skill_update_json_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
runner:
type: string
default: "ubuntu-latest"
branch:
type: string
default: ${{ github.ref }}

jobs:
update_skill_json:
Expand All @@ -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:
Expand All @@ -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: |
Expand Down
5 changes: 3 additions & 2 deletions requirements/update_skill_json.txt
Original file line number Diff line number Diff line change
@@ -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
# TODO: cattrs patching https://github.com/python-attrs/cattrs/issues/369
4 changes: 2 additions & 2 deletions scripts/update_skill_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down