-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name-template: 'v$RESOLVED_VERSION 🌈' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
change-template: '- #$NUMBER $TITLE @$AUTHOR' | ||
sort-direction: ascending | ||
exclude-contributors: | ||
- 'github-actions[bot]' | ||
- 'github-actions' | ||
- 'renovate[bot]' | ||
- 'renovate' | ||
exclude-labels: | ||
- 'skip-changelog' | ||
- 'dependencies' | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: '🧰 Maintenance' | ||
label: 'chore' | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'major' | ||
minor: | ||
labels: | ||
- 'minor' | ||
patch: | ||
labels: | ||
- 'patch' | ||
default: patch | ||
template: | | ||
## Changes | ||
$CHANGES | ||
$CONTRIBUTORS | ||
autolabeler: | ||
- label: 'bug' | ||
branch: | ||
- '/fix\/.+/' | ||
- label: 'enhancement' | ||
branch: | ||
- '/feature\/.+/' | ||
- '/feat\/.+/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""Update the manifest file.""" | ||
import json | ||
import os | ||
import sys | ||
|
||
|
||
def update_manifest(): | ||
"""Update the manifest file.""" | ||
version = "0.0.0" | ||
for index, value in enumerate(sys.argv): | ||
if value in ["--version", "-V"]: | ||
version = sys.argv[index + 1] | ||
|
||
with open( | ||
f"{os.getcwd()}/custom_components/tech/manifest.json", | ||
) as manifestfile: | ||
manifest = json.load(manifestfile) | ||
|
||
manifest["version"] = version | ||
|
||
with open( | ||
f"{os.getcwd()}/custom_components/tech/manifest.json", | ||
"w", | ||
) as manifestfile: | ||
manifestfile.write(json.dumps(manifest, indent=4, sort_keys=True)) | ||
|
||
|
||
update_manifest() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
update_release_draft: | ||
name: Update release draft | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Create Release | ||
uses: release-drafter/release-drafter@v6 | ||
with: | ||
disable-releaser: github.ref != 'refs/heads/main' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release_zip_file: | ||
name: Prepare release asset | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
- name: "Set manifest version number" | ||
run: | | ||
python3 ${{ github.workspace }}/.github/scripts/update_hacs_manifest.py --version ${{ github.ref_name }} | ||
- name: Create zip | ||
run: | | ||
cd custom_components/tech | ||
zip tech.zip -r ./ | ||
- name: Upload zip to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ./custom_components/tech/tech.zip | ||
asset_name: tech.zip | ||
tag: ${{ github.ref }} | ||
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Validate | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
validate-hassfest: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: "actions/checkout@v4" | ||
- uses: home-assistant/actions/hassfest@master | ||
validate-hacs: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: "actions/checkout@v4" | ||
- name: HACS validation | ||
uses: "hacs/action@main" | ||
with: | ||
category: "integration" |