Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jezza34000 committed Jan 7, 2025
2 parents 2cec621 + e107e32 commit f21e9e6
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# These are supported funding model platforms

github: Jezza34000
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: jezza
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,36 @@ on:
permissions: {}

jobs:

python-semantic-release:
runs-on: ubuntu-latest
concurrency: python-semantic-release
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.VERSION_MANAGER_APP_ID }}
private-key: ${{ secrets.VERSION_MANAGER_APP_PRIVATE_KEY }}

- name: Setup | Checkout Repository at workflow sha
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.sha }}
token: ${{ steps.app-token.outputs.token }}

- name: Setup | Force correct release branch on workflow sha
run: |
git checkout -B ${{ github.ref_name }} ${{ github.sha }}
- name: Action | Semantic Version Release
id: release
uses: python-semantic-release/python-semantic-release@v9
with:
github_token: ${{ steps.app-token.outputs.token }}
git_committer_name: "github-actions"
git_committer_email: "[email protected]"

release:
name: "Release"
runs-on: "ubuntu-latest"
Expand Down
48 changes: 44 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,54 @@ push = true
"{version}",
"{pep440_version}",
]
"README.md" = [
"{version}",
"{pep440_version}",
]

[tool.tox]
envlist = ["pre-commit"]

[testenv.pre-commit]
deps = ["pre-commit"]
commands = ["pre-commit run --all-files"]

# Python Semantic Release Configuration
[tool.semantic_release]
commit_parser = "emoji"
commit_message = "{version}\n\nAutomatically generated by python-semantic-release\n"
version_variables = ["custom_components/petkit/manifest.json:version"]

[tool.semantic_release.changelog]
mode = "update"

[tool.semantic_release.branches.main]
match = "(master)"

[tool.semantic_release.commit_parser_options]
default_bump_level = 2 # 1: pre-release / 2: patch / 3: minor / 4: major
major_tags = ["💥", ":boom:", "BREAKING CHANGE"]
minor_tags = [
"", ":sparkles:", "🚸", ":children_crossing:","💄", ":lipstick:",
"📱", ":iphone:", "🥚", ":egg:", "📈", ":chart_with_upwards_trend:",
"feat"
]
patch_tags = [
"🎨", ":art:", "⚡️", ":zap:", "🔥", ":fire:", "🐛", ":bug:", "🚑️", ":ambulance:",
"📝", ":memo:", "🚀", ":rocket:", "🎉", ":tada:", "", ":white_check_mark:",
"🔒️", ":lock:", "🔐", ":closed_lock_with_key:", "🔖", ":bookmark:",
"🚨", ":rotating_light:", "🚧", ":construction:", "💚", ":green_heart:",
"⬇️", ":arrow_down:", "⬆️", ":arrow_up:", "📌", ":pushpin:",
"👷", ":construction_worker:", "♻️", ":recycle:", "", ":heavy_plus_sign:",
"", ":heavy_minus_sign:", "🔧", ":wrench:", "🔨", ":hammer:",
"🌐", ":globe_with_meridians:", "✏️", ":pencil2:", "💩", ":poop:", "⏪️", ":rewind:",
"🔀", ":twisted_rightwards_arrows:", "📦️", ":package:", "👽️", ":alien:",
"🚚", ":truck:", "📄", ":page_facing_up:", "💥", ":boom:", "🍱", ":bento:",
"♿️", ":wheelchair:", "💡", ":bulb:", "🍻", ":beers:", "💬", ":speech_balloon:",
"🗃️", ":card_file_box:", "🔊", ":loud_sound:", "🔇", ":mute:",
"👥", ":busts_in_silhouette:", "🏗️", ":building_construction:", "📱", ":iphone:",
"🤡", ":clown_face:", "🙈", ":see_no_evil:", "📸", ":camera_flash:",
"⚗️", ":alembic:", "🔍️", ":mag:", "🏷️", ":label:", "🌱", ":seedling:",
"🚩", ":triangular_flag_on_post:", "🥅", ":goal_net:", "💫", ":dizzy:",
"🗑️", ":wastebasket:", "🛂", ":passport_control:", "🩹", ":adhesive_bandage:",
"🧐", ":monocle_face:", "⚰️", ":coffin:", "🧪", ":test_tube:", "👔", ":necktie:",
"🩺", ":stethoscope:", "🧱", ":bricks:", "‍💻", ":technologist:",
"💸", ":money_with_wings:", "🧵", ":thread:", "🦺", ":safety_vest:",
"build", "chore", "ci", "docs", "fix", "perf", "style", "refactor", "test"
]
10 changes: 10 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
sonar.projectKey=jezza34000_homeassistant_petkit
sonar.organization=Jezza34000

sonar.tests=tests
sonar.sources=custom_components/petkit
sonar.exclusions=**/tests/**

sonar.language=py
sonar.python.version=3.11, 3.12, 3.13
sonar.python.coverage.reportPaths=coverage.xml

0 comments on commit f21e9e6

Please sign in to comment.