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:
47
.github/workflows/release-addons.yaml
vendored
47
.github/workflows/release-addons.yaml
vendored
@@ -1,21 +1,14 @@
|
||||
name: Release Home-Assistant-Matter-Hub
|
||||
on:
|
||||
repository_dispatch:
|
||||
event_name: release-hamh
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
type: string
|
||||
description: The release version of Home Assistant Matter Hub
|
||||
required: true
|
||||
event_name: release
|
||||
# client_payload:
|
||||
# project: "hamh"
|
||||
# channel: "latest" | "beta" | "alpha"
|
||||
# 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:
|
||||
release:
|
||||
@@ -29,25 +22,37 @@ jobs:
|
||||
- name: Get Version
|
||||
id: event_parser
|
||||
run: |
|
||||
if [ -n "${{ github.event.client_payload.version }}" ]; then
|
||||
PROJECT="${{ github.event.client_payload.project }}"
|
||||
CHANNEL="${{ github.event.client_payload.channel }}"
|
||||
if [ "$CHANNEL" != "latest" ]; then
|
||||
PROJECT="$PROJECT-$CHANNEL"
|
||||
fi
|
||||
|
||||
echo "project=$PROJECT" >> "$GITHUB_OUTPUT"
|
||||
echo "channel=$CHANNEL" >> "$GITHUB_OUTPUT"
|
||||
echo "version=${{ github.event.client_payload.version }}" >> "$GITHUB_OUTPUT"
|
||||
elif [ -n "${{ github.event.inputs.version }}" ]; then
|
||||
echo "version=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "changelogUrl=${{ github.event.client_payload.changelogUrl }}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
if [ ! -d "$PROJECT" ]; then
|
||||
echo "No Project: $PROJECT"
|
||||
exit 1
|
||||
fi
|
||||
- run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
- name: Copy Changelog
|
||||
env:
|
||||
CHANGELOG_FILE: ${{steps.event_parser.outputs.project}}/CHANGELOG.md
|
||||
run: |
|
||||
curl ${{ env.repo_url }}/v${{ steps.event_parser.outputs.version }}/${{ env.repo_changelog }} > ${{ env.changelog_file }}
|
||||
git add ${{ env.changelog_file }}
|
||||
curl "${{ steps.event_parser.outputs.changelogUrl }}" > $CHANGELOG_FILE
|
||||
git add $CHANGELOG_FILE
|
||||
- name: Apply release version
|
||||
env:
|
||||
CONFIG_FILE: ${{steps.event_parser.outputs.project}}/config.yaml
|
||||
run: |
|
||||
yq -i ".version = \"${{ steps.event_parser.outputs.version }}\"" ${{ env.config_file }}
|
||||
git add ${{ env.config_file }}
|
||||
yq -i ".version = \"${{ steps.event_parser.outputs.version }}\"" $CONFIG_FILE
|
||||
git add $CONFIG_FILE
|
||||
- name: Publish
|
||||
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
|
||||
|
||||
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