mirror of
https://github.com/RiDDiX/home-assistant-addons.git
synced 2026-07-14 12:28:09 +08:00
feat: support different release types
This commit is contained in:
49
.github/workflows/release-addons.yaml
vendored
49
.github/workflows/release-addons.yaml
vendored
@@ -1,21 +1,14 @@
|
|||||||
name: Release Home-Assistant-Matter-Hub
|
name: Release Home-Assistant-Matter-Hub
|
||||||
on:
|
on:
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
event_name: release-hamh
|
event_name: release
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
version:
|
|
||||||
type: string
|
|
||||||
description: The release version of Home Assistant Matter Hub
|
|
||||||
required: true
|
|
||||||
# client_payload:
|
# client_payload:
|
||||||
|
# project: "hamh"
|
||||||
|
# channel: "latest" | "beta" | "alpha"
|
||||||
# version: "3.0.0-alpha.33"
|
# version: "3.0.0-alpha.33"
|
||||||
|
# changelogUrl: "https://..."
|
||||||
|
|
||||||
|
|
||||||
env:
|
|
||||||
repo_url: https://raw.githubusercontent.com/t0bst4r/home-assistant-matter-hub
|
|
||||||
repo_changelog: CHANGELOG.md
|
|
||||||
changelog_file: hamh/CHANGELOG.md
|
|
||||||
config_file: hamh/config.yaml
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@@ -29,25 +22,37 @@ jobs:
|
|||||||
- name: Get Version
|
- name: Get Version
|
||||||
id: event_parser
|
id: event_parser
|
||||||
run: |
|
run: |
|
||||||
if [ -n "${{ github.event.client_payload.version }}" ]; then
|
PROJECT="${{ github.event.client_payload.project }}"
|
||||||
echo "version=${{ github.event.client_payload.version }}" >> "$GITHUB_OUTPUT"
|
CHANNEL="${{ github.event.client_payload.channel }}"
|
||||||
elif [ -n "${{ github.event.inputs.version }}" ]; then
|
if [ "$CHANNEL" != "latest" ]; then
|
||||||
echo "version=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT"
|
PROJECT="$PROJECT-$CHANNEL"
|
||||||
else
|
fi
|
||||||
|
|
||||||
|
echo "project=$PROJECT" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "channel=$CHANNEL" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "version=${{ github.event.client_payload.version }}" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "changelogUrl=${{ github.event.client_payload.changelogUrl }}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
if [ ! -d "$PROJECT" ]; then
|
||||||
|
echo "No Project: $PROJECT"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- run: |
|
- run: |
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
- name: Copy Changelog
|
- name: Copy Changelog
|
||||||
|
env:
|
||||||
|
CHANGELOG_FILE: ${{steps.event_parser.outputs.project}}/CHANGELOG.md
|
||||||
run: |
|
run: |
|
||||||
curl ${{ env.repo_url }}/v${{ steps.event_parser.outputs.version }}/${{ env.repo_changelog }} > ${{ env.changelog_file }}
|
curl "${{ steps.event_parser.outputs.changelogUrl }}" > $CHANGELOG_FILE
|
||||||
git add ${{ env.changelog_file }}
|
git add $CHANGELOG_FILE
|
||||||
- name: Apply release version
|
- name: Apply release version
|
||||||
|
env:
|
||||||
|
CONFIG_FILE: ${{steps.event_parser.outputs.project}}/config.yaml
|
||||||
run: |
|
run: |
|
||||||
yq -i ".version = \"${{ steps.event_parser.outputs.version }}\"" ${{ env.config_file }}
|
yq -i ".version = \"${{ steps.event_parser.outputs.version }}\"" $CONFIG_FILE
|
||||||
git add ${{ env.config_file }}
|
git add $CONFIG_FILE
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: |
|
run: |
|
||||||
git commit -m "bumb(home-assistant-matter-hub): bumb to version ${{ steps.event_parser.outputs.version }}"
|
git commit -m "bumb(${{steps.event_parser.outputs.project}}): bumb to version ${{ steps.event_parser.outputs.version }}"
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|||||||
1275
hamh-beta/CHANGELOG.md
Normal file
1275
hamh-beta/CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load Diff
28
hamh-beta/config.yaml
Normal file
28
hamh-beta/config.yaml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
version: "3.0.0-alpha.95"
|
||||||
|
image: ghcr.io/t0bst4r/home-assistant-matter-hub-addon
|
||||||
|
slug: hamh-beta
|
||||||
|
name: Home-Assistant-Matter-Hub (Beta)
|
||||||
|
description: Beta Releases of Home Assistant Matter Hub
|
||||||
|
url: https://github.com/t0bst4r/home-assistant-matter-hub
|
||||||
|
panel_icon: mdi:hub
|
||||||
|
panel_title: Matter Hub (Beta)
|
||||||
|
homeassistant: 2024.1.0
|
||||||
|
homeassistant_api: true
|
||||||
|
host_network: true
|
||||||
|
init: false
|
||||||
|
arch:
|
||||||
|
- aarch64
|
||||||
|
- amd64
|
||||||
|
- armv7
|
||||||
|
ingress: true
|
||||||
|
ingress_port: 0
|
||||||
|
map:
|
||||||
|
- addon_config:rw
|
||||||
|
options:
|
||||||
|
app_log_level: info
|
||||||
|
disable_log_colors: false
|
||||||
|
mdns_network_interface: ""
|
||||||
|
schema:
|
||||||
|
app_log_level: list(silly|debug|info|notice|warn|error|fatal)
|
||||||
|
disable_log_colors: bool
|
||||||
|
mdns_network_interface: "str?"
|
||||||
BIN
hamh-beta/icon.png
Normal file
BIN
hamh-beta/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
BIN
hamh-beta/logo.png
Normal file
BIN
hamh-beta/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
14
hamh-beta/translations/en.yaml
Normal file
14
hamh-beta/translations/en.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
configuration:
|
||||||
|
app_log_level:
|
||||||
|
name: Log Level
|
||||||
|
description: |
|
||||||
|
The log level used for this addon. One of: silly, debug, info, warn, error
|
||||||
|
disable_log_colors:
|
||||||
|
name: Disable log colors
|
||||||
|
description: |
|
||||||
|
Print the log as plain text without any colors.
|
||||||
|
mdns_network_interface:
|
||||||
|
name: mDNS Network Interface
|
||||||
|
description: |
|
||||||
|
Limit mDNS to this network interface. Only change it if you know what you are doing. Default: empty
|
||||||
Reference in New Issue
Block a user