Skip to content

Commit

Permalink
Merge pull request #5 from OpenVoiceOS/release-0.0.1a1
Browse files Browse the repository at this point in the history
Release 0.0.1a1
  • Loading branch information
JarbasAl authored Sep 9, 2024
2 parents 0a2b20f + 2a0c6da commit 3c84349
Show file tree
Hide file tree
Showing 13 changed files with 670 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Run Build Tests
on:
push:
branches:
- master
pull_request:
branches:
- dev
workflow_dispatch:

jobs:
build_tests:
strategy:
max-parallel: 2
matrix:
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- 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 repo
run: |
pip install .
- uses: pypa/gh-action-pip-audit@v1.0.8
with:
# Ignore irrelevant Mercurial vulnerability
# Ignore `requests` and `urllib3` vulnerabilities as they are not used in this package
# Ignore `setuptools` and `pip` vulnerabilities I don't think they apply here
ignore-vulns: |
PYSEC-2023-228
GHSA-9wx4-h78v-vm56
GHSA-34jh-p97f-mpxf
PYSEC-2022-43012
10 changes: 10 additions & 0 deletions .github/workflows/conventional-label.yml
Original file line number Diff line number Diff line change
@@ -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
39 changes: 39 additions & 0 deletions .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Run License Tests
on:
push:
branches:
- master
pull_request:
branches:
- dev
workflow_dispatch:

jobs:
license_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
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: Install core repo
run: |
pip install .
- name: Check python
id: license_check_report
uses: pilosus/action-pip-license-checker@v0.5.0
with:
fail: 'Copyleft,Other,Error'
fails-only: true
exclude-license: '^(Mozilla).*$'
- name: Print report
if: ${{ always() }}
run: echo "${{ steps.license_check_report.outputs.report }}"
72 changes: 72 additions & 0 deletions .github/workflows/publish_stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
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_PHAL_plugin_mk2_v6_fan_control/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: 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: true
commitish: dev
- 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}}


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
122 changes: 122 additions & 0 deletions .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
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_PHAL_plugin_mk2_v6_fan_control/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: 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: true
commitish: dev
- 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
10 changes: 10 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Unit Tests
on:
push:
workflow_dispatch:

jobs:
py_build_tests:
uses: neongeckocom/.github/.github/workflows/python_build_tests.yml@master
with:
python_version: "3.8"
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
dev.env
.dev_opts.json
.idea
*.code-workspace
*.pyc
*.swp
*~
*.egg-info/
build
dist
.coverage
/htmlcov
.installed
.mypy_cache
.vscode
.theia
.venv/
__pycache__

# Created by unit tests
.pytest_cache/
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog

## [0.0.1a1](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-mk2-v6-fan-control/tree/0.0.1a1) (2024-09-09)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-mk2-v6-fan-control/compare/0a2b20ffc5266a90761b663bffff777fc3f5b9ea...0.0.1a1)

**Fixed bugs:**

- added initialization and right class name \(and one missing import\) [\#3](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-mk2-v6-fan-control/pull/3) ([denics](https://github.com/denics))
- added missing import [\#1](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-mk2-v6-fan-control/pull/1) ([denics](https://github.com/denics))

**Merged pull requests:**

- Update imports [\#4](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-mk2-v6-fan-control/pull/4) ([builderjer](https://github.com/builderjer))



\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
Loading

0 comments on commit 3c84349

Please sign in to comment.