diff --git a/.github/workflows/auto_translate.yml b/.github/workflows/auto_translate.yml deleted file mode 100644 index 2945f94..0000000 --- a/.github/workflows/auto_translate.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Auto translate -on: - workflow_dispatch: - push: - branches: - - dev - -jobs: - translate: - 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 Translate Tools - run: | - pip install git+https://github.com/NeonGeckoCom/neon-lang-plugin-libretranslate - - name: Auto Translate - run: | - python scripts/translate.py - - name: Commit to dev - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Auto Translate - branch: dev - prepare_skillstore: - 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 OSM - run: | - pip install ovos-skills-manager~=0.0.10 - - name: Update Skill Store metadata - run: | - python scripts/prepare_skillstore.py - - name: Commit to dev - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Update skill store metadata - branch: dev diff --git a/.github/workflows/conventional-label.yml b/.github/workflows/conventional-label.yml new file mode 100644 index 0000000..9894c1b --- /dev/null +++ b/.github/workflows/conventional-label.yml @@ -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 diff --git a/.github/workflows/publish_build.yml b/.github/workflows/publish_build.yml deleted file mode 100644 index 6f7c8ad..0000000 --- a/.github/workflows/publish_build.yml +++ /dev/null @@ -1,86 +0,0 @@ -# This workflow will generate a distribution and upload it to PyPI - -name: Publish Build Release ..X -on: - workflow_dispatch: - -jobs: - build_and_publish: - 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: Remove alpha (declare stable) - run: | - VER=$(python setup.py --version) - python scripts/remove_alpha.py - - name: "Generate release changelog" - uses: heinrichreimer/github-changelog-generator-action@v2.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - id: changelog - - name: Commit to dev - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Declare alpha stable - branch: dev - - name: Push dev -> master - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: master - force: true - - name: version - run: echo "::set-output name=version::$(python setup.py --version)" - id: version - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: V${{ steps.version.outputs.version }} - release_name: Release ${{ steps.version.outputs.version }} - body: | - Changes in this Release - ${{ steps.changelog.outputs.changelog }} - draft: false - prerelease: false - commitish: dev - - name: Build Distribution Packages - run: | - python setup.py bdist_wheel - - name: Prepare next Build version - run: echo "::set-output name=version::$(python setup.py --version)" - id: alpha - - name: Increment Version ${{ steps.alpha.outputs.version }}Alpha0 - run: | - VER=$(python setup.py --version) - python scripts/bump_build.py - - name: Commit to dev - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Prepare Next Version - branch: dev - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{secrets.PYPI_TOKEN}} - - 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 skill-ovos-fallback-unknown release! ${{ steps.version.outputs.version }} diff --git a/.github/workflows/publish_major.yml b/.github/workflows/publish_major.yml deleted file mode 100644 index 220cdfe..0000000 --- a/.github/workflows/publish_major.yml +++ /dev/null @@ -1,86 +0,0 @@ -# This workflow will generate a distribution and upload it to PyPI - -name: Publish Major Release X.0.0 -on: - workflow_dispatch: - -jobs: - build_and_publish: - 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: Remove alpha (declare stable) - run: | - VER=$(python setup.py --version) - python scripts/remove_alpha.py - - name: "Generate release changelog" - uses: heinrichreimer/github-changelog-generator-action@v2.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - id: changelog - - name: Commit to dev - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Declare alpha stable - branch: dev - - name: Push dev -> master - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: master - force: true - - name: version - run: echo "::set-output name=version::$(python setup.py --version)" - id: version - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: V${{ steps.version.outputs.version }} - release_name: Release ${{ steps.version.outputs.version }} - body: | - Changes in this Release - ${{ steps.changelog.outputs.changelog }} - draft: false - prerelease: false - commitish: master - - name: Build Distribution Packages - run: | - python setup.py bdist_wheel - - name: Prepare next Major version - run: echo "::set-output name=version::$(python setup.py --version)" - id: alpha - - name: Increment Version ${{ steps.alpha.outputs.version }}Alpha0 - run: | - VER=$(python setup.py --version) - python scripts/bump_major.py - - name: Commit to dev - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Prepare Next Version - branch: dev - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{secrets.PYPI_TOKEN}} - - 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 skill-ovos-fallback-unknown release! ${{ steps.version.outputs.version }} diff --git a/.github/workflows/publish_minor.yml b/.github/workflows/publish_minor.yml deleted file mode 100644 index eeadd42..0000000 --- a/.github/workflows/publish_minor.yml +++ /dev/null @@ -1,86 +0,0 @@ -# This workflow will generate a distribution and upload it to PyPI - -name: Publish Minor Release .X.0 -on: - workflow_dispatch: - -jobs: - build_and_publish: - 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: Remove alpha (declare stable) - run: | - VER=$(python setup.py --version) - python scripts/remove_alpha.py - - name: "Generate release changelog" - uses: heinrichreimer/github-changelog-generator-action@v2.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - id: changelog - - name: Commit to dev - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Declare alpha stable - branch: dev - - name: Push dev -> master - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: master - force: true - - name: version - run: echo "::set-output name=version::$(python setup.py --version)" - id: version - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: V${{ steps.version.outputs.version }} - release_name: Release ${{ steps.version.outputs.version }} - body: | - Changes in this Release - ${{ steps.changelog.outputs.changelog }} - draft: false - prerelease: false - commitish: master - - name: Build Distribution Packages - run: | - python setup.py bdist_wheel - - name: Prepare next Minor version - run: echo "::set-output name=version::$(python setup.py --version)" - id: alpha - - name: Increment Version ${{ steps.alpha.outputs.version }}Alpha0 - run: | - VER=$(python setup.py --version) - python scripts/bump_minor.py - - name: Commit to dev - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Prepare Next Version - branch: dev - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{secrets.PYPI_TOKEN}} - - 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 skill-ovos-fallback-unknown release! ${{ steps.version.outputs.version }} diff --git a/.github/workflows/publish_alpha.yml b/.github/workflows/publish_stable.yml similarity index 58% rename from .github/workflows/publish_alpha.yml rename to .github/workflows/publish_stable.yml index b43f906..c9393e7 100644 --- a/.github/workflows/publish_alpha.yml +++ b/.github/workflows/publish_stable.yml @@ -1,25 +1,22 @@ -# This workflow will generate a distribution and upload it to PyPI - -name: Publish Alpha Build ...aX +name: Stable Release on: push: - branches: - - dev - paths-ignore: - - 'test/**' - - 'examples/**' - - '.github/**' - - '.gitignore' - - 'LICENSE' - - 'CHANGELOG.md' - - 'MANIFEST.in' - - 'readme.md' - - 'scripts/**' - - 'translations/**' + branches: [master] workflow_dispatch: jobs: - build_and_publish: + publish_stable: + uses: TigreGotico/gh-automations/.github/workflows/publish-stable.yml@master + secrets: inherit + with: + branch: 'master' + version_file: '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 @@ -33,20 +30,6 @@ jobs: - name: Install Build Tools run: | python -m pip install build wheel - - name: Increment Version - run: | - VER=$(python setup.py --version) - python scripts/bump_alpha.py - - name: "Generate release changelog" - uses: heinrichreimer/github-changelog-generator-action@v2.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - id: changelog - - name: Commit to dev - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Prepare alpha version package - branch: dev - name: version run: echo "::set-output name=version::$(python setup.py --version)" id: version @@ -63,10 +46,27 @@ jobs: ${{ steps.changelog.outputs.changelog }} draft: false prerelease: true + commitish: dev - name: Build Distribution Packages run: | - python setup.py bdist_wheel + python setup.py sdist bdist_wheel - name: Publish to Test 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..d17f77f --- /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: '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 Test 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/.gitignore b/.gitignore index 723ef36..85bea1f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,34 @@ -.idea \ No newline at end of file +dev.env +.dev_opts.json +.idea +*.code-workspace +*.pyc +*.swp +*~ +mimic +/skills +pocketsphinx-python +*.egg-info/ +build +dist +tornado.web +tornado.ioloop +mycroft/__version__.py +scripts/logs/* +logs/* +.coverage +/htmlcov +test/audio_accuracy/data +scripts/*.screen +doc/_build/ +.installed +.mypy_cache +.vscode +.theia +.venv/ + +# Created by unit tests +test/unittests/skills/test_skill/settings.json +test_conf.json +.pytest_cache/ +/.gtm/ diff --git a/CHANGELOG.md b/CHANGELOG.md index f8d2477..5ce8180 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,21 +1,13 @@ # Changelog -## [V0.0.1a2](https://github.com/OpenVoiceOS/skill-ovos-soundcloud/tree/V0.0.1a2) (2024-09-02) +## [0.1.2a1](https://github.com/OpenVoiceOS/skill-ovos-soundcloud/tree/0.1.2a1) (2024-10-15) -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-soundcloud/compare/1d057e97e09de9157124aafc951b320bad4e3bba...V0.0.1a2) - -**Fixed bugs:** - -- fix imports [\#2](https://github.com/OpenVoiceOS/skill-ovos-soundcloud/pull/2) ([JarbasAl](https://github.com/JarbasAl)) +[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-soundcloud/compare/V0.0.1...0.1.2a1) **Merged pull requests:** -- feat/skill\_aliases [\#9](https://github.com/OpenVoiceOS/skill-ovos-soundcloud/pull/9) ([JarbasAl](https://github.com/JarbasAl)) -- refactor/ocp\_modernize [\#8](https://github.com/OpenVoiceOS/skill-ovos-soundcloud/pull/8) ([JarbasAl](https://github.com/JarbasAl)) -- review soundcloud.voc it-it [\#5](https://github.com/OpenVoiceOS/skill-ovos-soundcloud/pull/5) ([denics](https://github.com/denics)) -- feat/runtime\_requirements [\#4](https://github.com/OpenVoiceOS/skill-ovos-soundcloud/pull/4) ([JarbasAl](https://github.com/JarbasAl)) -- workflows [\#3](https://github.com/OpenVoiceOS/skill-ovos-soundcloud/pull/3) ([JarbasAl](https://github.com/JarbasAl)) -- setup.py template [\#1](https://github.com/OpenVoiceOS/skill-ovos-soundcloud/pull/1) ([JarbasAl](https://github.com/JarbasAl)) +- fix:long description [\#11](https://github.com/OpenVoiceOS/skill-ovos-soundcloud/pull/11) ([JarbasAl](https://github.com/JarbasAl)) +- semver [\#10](https://github.com/OpenVoiceOS/skill-ovos-soundcloud/pull/10) ([JarbasAl](https://github.com/JarbasAl)) diff --git a/__init__.py b/__init__.py index eb2f5d3..221e6d9 100755 --- a/__init__.py +++ b/__init__.py @@ -5,7 +5,7 @@ from nuvem_de_som import SoundCloud from ovos_utils import classproperty from ovos_utils.log import LOG -from ovos_workshop.backwards_compat import MediaType, PlaybackType, Playlist, PluginStream, dict2entry +from ovos_utils.ocp import MediaType, PlaybackType, Playlist, PluginStream, dict2entry from ovos_utils.parse import fuzzy_match, MatchStrategy from ovos_utils.process_utils import RuntimeRequirements from ovos_workshop.skills.common_play import OVOSCommonPlaybackSkill, \ diff --git a/requirements.txt b/requirements.txt index 5b37817..0487a98 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -ovos-utils >= 0.0.38 -ovos-workshop>=0.0.16a43 -ovos_plugin_common_play +ovos-utils >= 0.1.0 +ovos-workshop>=0.0.16 nuvem_de_som \ No newline at end of file diff --git a/setup.py b/setup.py index d6f6c10..d86be24 100755 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ def find_resource_files(): return package_data -with open("README.md", "r") as f: +with open(path.join(path.abspath(path.dirname(__file__)), "README.md"), "r") as f: long_description = f.read() def get_version(): diff --git a/version.py b/version.py index 76c4342..0349344 100644 --- a/version.py +++ b/version.py @@ -1,6 +1,6 @@ # START_VERSION_BLOCK VERSION_MAJOR = 0 -VERSION_MINOR = 0 -VERSION_BUILD = 1 -VERSION_ALPHA = 0 +VERSION_MINOR = 1 +VERSION_BUILD = 2 +VERSION_ALPHA = 1 # END_VERSION_BLOCK