diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml new file mode 100644 index 0000000..fafcc6a --- /dev/null +++ b/.github/workflows/build_tests.yml @@ -0,0 +1,32 @@ +name: Run Build Tests +on: + push: + workflow_dispatch: + +jobs: + build_tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install Build Tools + run: | + python -m pip install build wheel + - name: Install System Dependencies + run: | + sudo apt-get update + sudo apt install python3-dev swig libssl-dev + - name: Build Source Packages + run: | + python setup.py sdist + - name: Build Distribution Packages + run: | + python setup.py bdist_wheel + - name: Install core repo + run: | + pip install .[extras] diff --git a/.github/workflows/conventional-label.yaml b/.github/workflows/conventional-label.yaml new file mode 100644 index 0000000..0a449cb --- /dev/null +++ b/.github/workflows/conventional-label.yaml @@ -0,0 +1,10 @@ +# auto add labels to PRs +on: + pull_request_target: + types: [ opened, edited ] +name: conventional-release-labels +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: bcoe/conventional-release-labels@v1 \ No newline at end of file diff --git a/.github/workflows/notify_matrix.yml b/.github/workflows/notify_matrix.yml deleted file mode 100644 index 79422a7..0000000 --- a/.github/workflows/notify_matrix.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Close Pull Request - -# only trigger on pull request closed events -on: - pull_request: - types: [ closed ] - -jobs: - merge_job: - # this job will only run if the PR has been merged - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Send message to Matrix bots channel - id: matrix-chat-message - uses: fadenb/matrix-chat-message@v0.0.6 - with: - homeserver: 'matrix.org' - token: ${{ secrets.MATRIX_TOKEN }} - channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org' - message: | - new ovos-gui PR merged! https://github.com/OpenVoiceOS/ovos-gui/pull/${{ github.event.number }} diff --git a/.github/workflows/propose_release.yml b/.github/workflows/propose_release.yml deleted file mode 100644 index 97f792f..0000000 --- a/.github/workflows/propose_release.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Propose Stable Release -on: - workflow_dispatch: - inputs: - release_type: - type: choice - description: Release Type - options: - - build - - minor - - major -jobs: - update_version: - uses: neongeckocom/.github/.github/workflows/propose_semver_release.yml@master - with: - release_type: ${{ inputs.release_type }} - version_file: ovos_gui/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: - 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 }} diff --git a/.github/workflows/publish_alpha.yml b/.github/workflows/publish_alpha.yml deleted file mode 100644 index da7eedf..0000000 --- a/.github/workflows/publish_alpha.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This workflow will generate a distribution and upload it to PyPI - -name: Publish Alpha Build ...aX -on: - push: - branches: - - dev - paths-ignore: - - 'ovos_gui/version.py' - - 'test/**' - - '.github/**' - - '.gitignore' - - 'LICENSE' - - 'CHANGELOG.md' - - 'MANIFEST.in' - - 'README.md' - - 'scripts/**' - workflow_dispatch: - -jobs: - publish_alpha_release: - uses: neongeckocom/.github/.github/workflows/publish_alpha_release.yml@master - secrets: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - with: - version_file: "ovos_gui/version.py" - publish_prerelease: true - 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/publish_release.yml b/.github/workflows/publish_release.yml deleted file mode 100644 index 185756a..0000000 --- a/.github/workflows/publish_release.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Publish Release -on: - push: - branches: - - master - -jobs: - build_and_publish_pypi_and_release: - uses: neongeckocom/.github/.github/workflows/publish_stable_release.yml@master - secrets: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/publish_stable.yml b/.github/workflows/publish_stable.yml new file mode 100644 index 0000000..283e468 --- /dev/null +++ b/.github/workflows/publish_stable.yml @@ -0,0 +1,58 @@ +name: Stable Release +on: + push: + branches: [master] + workflow_dispatch: + +jobs: + publish_stable: + uses: TigreGotico/gh-automations/.github/workflows/publish-stable.yml@master + secrets: inherit + with: + branch: 'master' + version_file: 'ovos_gui/version.py' + setup_py: 'setup.py' + publish_release: true + + publish_pypi: + needs: publish_stable + if: success() # Ensure this job only runs if the previous job succeeds + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: dev + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install Build Tools + run: | + python -m pip install build wheel + - name: version + run: echo "::set-output name=version::$(python setup.py --version)" + id: version + - name: Build Distribution Packages + run: | + python setup.py sdist bdist_wheel + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{secrets.PYPI_TOKEN}} + + + sync_dev: + needs: publish_stable + if: success() # Ensure this job only runs if the previous job succeeds + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + ref: master + - name: Push master -> dev + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: dev \ No newline at end of file diff --git a/.github/workflows/release_workflow.yml b/.github/workflows/release_workflow.yml new file mode 100644 index 0000000..d5f6ed2 --- /dev/null +++ b/.github/workflows/release_workflow.yml @@ -0,0 +1,108 @@ +name: Release Alpha and Propose Stable + +on: + pull_request: + types: [closed] + branches: [dev] + +jobs: + publish_alpha: + if: github.event.pull_request.merged == true + uses: TigreGotico/gh-automations/.github/workflows/publish-alpha.yml@master + secrets: inherit + with: + branch: 'dev' + version_file: 'ovos_gui/version.py' + setup_py: 'setup.py' + update_changelog: true + publish_prerelease: true + changelog_max_issues: 100 + + notify: + if: github.event.pull_request.merged == true + needs: publish_alpha + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Send message to Matrix bots channel + id: matrix-chat-message + uses: fadenb/matrix-chat-message@v0.0.6 + with: + homeserver: 'matrix.org' + token: ${{ secrets.MATRIX_TOKEN }} + channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org' + message: | + new ${{ github.event.repository.name }} PR merged! https://github.com/${{ github.repository }}/pull/${{ github.event.number }} + + publish_pypi: + needs: publish_alpha + if: success() # Ensure this job only runs if the previous job succeeds + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: dev + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install Build Tools + run: | + python -m pip install build wheel + - name: version + run: echo "::set-output name=version::$(python setup.py --version)" + id: version + - name: Build Distribution Packages + run: | + python setup.py sdist bdist_wheel + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{secrets.PYPI_TOKEN}} + + + propose_release: + needs: publish_alpha + if: success() # Ensure this job only runs if the previous job succeeds + runs-on: ubuntu-latest + steps: + - name: Checkout dev branch + uses: actions/checkout@v3 + with: + ref: dev + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.10' + + - name: Get version from setup.py + id: get_version + run: | + VERSION=$(python setup.py --version) + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Create and push new branch + run: | + git checkout -b release-${{ env.VERSION }} + git push origin release-${{ env.VERSION }} + + - name: Open Pull Request from dev to master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Variables + BRANCH_NAME="release-${{ env.VERSION }}" + BASE_BRANCH="master" + HEAD_BRANCH="release-${{ env.VERSION }}" + PR_TITLE="Release ${{ env.VERSION }}" + PR_BODY="Human review requested!" + + # Create a PR using GitHub API + curl -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: token $GITHUB_TOKEN" \ + -d "{\"title\":\"$PR_TITLE\",\"body\":\"$PR_BODY\",\"head\":\"$HEAD_BRANCH\",\"base\":\"$BASE_BRANCH\"}" \ + https://api.github.com/repos/${{ github.repository }}/pulls + diff --git a/CHANGELOG.md b/CHANGELOG.md index dbd0df3..1e37a1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,77 +1,21 @@ # Changelog -## [0.2.0](https://github.com/OpenVoiceOS/ovos-gui/tree/0.2.0) (2024-09-02) +## [0.2.0a1](https://github.com/OpenVoiceOS/ovos-gui/tree/0.2.0a1) (2024-09-11) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.1.0a2...0.2.0) - -**Fixed bugs:** - -- Stuck on OVOS logo [\#42](https://github.com/OpenVoiceOS/ovos-gui/issues/42) - -**Closed issues:** - -- Gui roadmap [\#2](https://github.com/OpenVoiceOS/ovos-gui/issues/2) - -## [0.1.0a2](https://github.com/OpenVoiceOS/ovos-gui/tree/0.1.0a2) (2024-02-08) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.0.4a5...0.1.0a2) - -**Implemented enhancements:** - -- house cleaning [\#39](https://github.com/OpenVoiceOS/ovos-gui/pull/39) ([NeonJarbas](https://github.com/NeonJarbas)) - -## [0.0.4a5](https://github.com/OpenVoiceOS/ovos-gui/tree/0.0.4a5) (2023-12-29) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.0.4a4...0.0.4a5) - -**Closed issues:** - -- "OSError: \[Errno 98\] Address already in use" when restarted too fast [\#24](https://github.com/OpenVoiceOS/ovos-gui/issues/24) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.1.0a1...0.2.0a1) **Merged pull requests:** -- Update requirements.txt [\#33](https://github.com/OpenVoiceOS/ovos-gui/pull/33) ([JarbasAl](https://github.com/JarbasAl)) - -## [0.0.4a4](https://github.com/OpenVoiceOS/ovos-gui/tree/0.0.4a4) (2023-10-06) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.0.4a3...0.0.4a4) - -**Merged pull requests:** - -- Update protocol.md [\#32](https://github.com/OpenVoiceOS/ovos-gui/pull/32) ([JarbasAl](https://github.com/JarbasAl)) - -## [0.0.4a3](https://github.com/OpenVoiceOS/ovos-gui/tree/0.0.4a3) (2023-09-29) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.0.4a2...0.0.4a3) - -**Fixed bugs:** - -- Refactor skills status check to resolve init bug [\#31](https://github.com/OpenVoiceOS/ovos-gui/pull/31) ([NeonDaniel](https://github.com/NeonDaniel)) - -**Closed issues:** - -- You must execute run\_forever\(\) before emitting messages [\#30](https://github.com/OpenVoiceOS/ovos-gui/issues/30) - -## [0.0.4a2](https://github.com/OpenVoiceOS/ovos-gui/tree/0.0.4a2) (2023-09-29) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.0.4a1...0.0.4a2) - -**Implemented enhancements:** - -- Add option to use host paths in containers in addition to http URLs [\#25](https://github.com/OpenVoiceOS/ovos-gui/pull/25) ([NeonDaniel](https://github.com/NeonDaniel)) - -## [0.0.4a1](https://github.com/OpenVoiceOS/ovos-gui/tree/0.0.4a1) (2023-09-28) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.0.3...0.0.4a1) +- feat:extras\_requirements [\#49](https://github.com/OpenVoiceOS/ovos-gui/pull/49) ([JarbasAl](https://github.com/JarbasAl)) +- chore:semver\_automations [\#48](https://github.com/OpenVoiceOS/ovos-gui/pull/48) ([JarbasAl](https://github.com/JarbasAl)) -**Fixed bugs:** +## [0.1.0a1](https://github.com/OpenVoiceOS/ovos-gui/tree/0.1.0a1) (2024-09-10) -- ovos-core must be restarted to re-upload QML files [\#28](https://github.com/OpenVoiceOS/ovos-gui/issues/28) -- Check if Skills service is running on GUI service init [\#29](https://github.com/OpenVoiceOS/ovos-gui/pull/29) ([NeonDaniel](https://github.com/NeonDaniel)) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.1.0...0.1.0a1) **Merged pull requests:** -- add plugins to readme [\#27](https://github.com/OpenVoiceOS/ovos-gui/pull/27) ([JarbasAl](https://github.com/JarbasAl)) +- chore:semver\_automations [\#46](https://github.com/OpenVoiceOS/ovos-gui/pull/46) ([JarbasAl](https://github.com/JarbasAl)) diff --git a/ovos_gui/version.py b/ovos_gui/version.py index cbb1e3f..59c1ec1 100644 --- a/ovos_gui/version.py +++ b/ovos_gui/version.py @@ -1,6 +1,6 @@ # START_VERSION_BLOCK VERSION_MAJOR = 0 -VERSION_MINOR = 1 +VERSION_MINOR = 2 VERSION_BUILD = 0 -VERSION_ALPHA = 0 -# END_VERSION_BLOCK +VERSION_ALPHA = 1 +# END_VERSION_BLOCK \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index ce9c033..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -ovos-bus-client~=0.0, >=0.0.7 -ovos-utils~=0.0, >=0.0.37 -ovos-config~=0.0,>=0.0.12 -tornado~=6.0, >=6.0.3 -ovos-plugin-manager>=0.0.24 diff --git a/requirements/extras.txt b/requirements/extras.txt new file mode 100644 index 0000000..24887d6 --- /dev/null +++ b/requirements/extras.txt @@ -0,0 +1 @@ +ovos-gui-plugin-shell-companion>=0.0.0,<1.0.0 \ No newline at end of file diff --git a/requirements/requirements.txt b/requirements/requirements.txt new file mode 100644 index 0000000..185eda9 --- /dev/null +++ b/requirements/requirements.txt @@ -0,0 +1,5 @@ +ovos_bus_client>=0.0.7,<1.0.0 +ovos-utils>=0.0.37,<1.0.0 +ovos-config>=0.0.12,<1.0.0 +tornado~=6.0, >=6.0.3 +ovos-plugin-manager>=0.0.24,<1.0.0 diff --git a/setup.py b/setup.py index 47eefc7..3221d04 100644 --- a/setup.py +++ b/setup.py @@ -80,7 +80,10 @@ def get_description(): include_package_data=True, packages=["ovos_gui"], package_data={"": package_files('ovos_gui/res')}, - install_requires=required('requirements.txt'), + install_requires=required('requirements/requirements.txt'), + extras_require={ + "extras": required("requirements/extras.txt") + }, entry_points={ 'console_scripts': [ 'ovos-gui-service=ovos_gui.__main__:main',