Skip to content

Commit

Permalink
v4.56.2
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker committed Apr 27, 2024
1 parent e11fc5a commit 1fac5ae
Show file tree
Hide file tree
Showing 11 changed files with 217 additions and 45 deletions.
4 changes: 2 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'

categories:
- title: 'Breaking Changes'
Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/alpha-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
jobs:
publish:
if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }}
name: "Publish Pre Release Alpha to NPM"
uses: homebridge/.github/.github/workflows/npm-publish.yml@latest
with:
tag: 'alpha'
Expand All @@ -17,3 +18,91 @@ jobs:
install_cmd: npm ci && cd ui && npm ci
secrets:
npm_auth_token: ${{ secrets.npm_token }}

pre-release-alpha:
needs: [publish]
name: "Create New Github Alpha Pre Release"
if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create nightly release
id: create_release
uses: viperproject/create-nightly-release@v1
env:
# This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ needs.publish.outputs.NPM_VERSION }}
release_name: v${{ needs.publish.outputs.NPM_VERSION }}
body: |
v${{ needs.publish.outputs.NPM_VERSION }}
[How To Test Upcoming Changes](https://github.com/homebridge/homebridge-config-ui-x/wiki/How-To-Test-Upcoming-Changes)
keep_num: 0 # remove the just created release as well
keep_tags: false

attach-artifact:
name: Attach Artifact
needs: [publish, pre-release-alpha]
runs-on: ubuntu-latest

steps:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Install package v${{ needs.publish.outputs.NPM_VERSION }}
run: |
export npm_config_prefix=$(pwd)/package
npm install -g homebridge-config-ui-x@${{ needs.publish.outputs.NPM_VERSION }}
- name: Remove invalid node-pty node-gyp run v${{ needs.publish.outputs.NPM_VERSION }}
run: |
rm -rf $(pwd)/package/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/build
- name: Create Bundle v${{ needs.publish.outputs.NPM_VERSION }}
run: |
tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ needs.publish.outputs.NPM_VERSION }}.tar.gz .
shasum -a 256 homebridge-config-ui-x-${{ needs.publish.outputs.NPM_VERSION }}.tar.gz > SHASUMS256.txt
- name: Check Bundle v${{ needs.publish.outputs.NPM_VERSION }}
run: |
if [ $(stat -c%s "homebridge-config-ui-x-${{ needs.publish.outputs.NPM_VERSION }}.tar.gz") -lt 10000000 ]; then
echo "Bundle is under 10MB, stopping"
exit 1
fi
- name: Upload tar.gz Bundle to GitHub Artifacts v${{ needs.publish.outputs.NPM_VERSION }}
uses: actions/upload-artifact@v4
with:
name: 'homebridge-config-ui-x-${{ needs.publish.outputs.NPM_VERSION }}.tar.gz'
path: |
./homebridge-config-ui-x-${{ needs.publish.outputs.NPM_VERSION }}.tar.gz

- name: Upload SHASUMS256.txt to GitHub Artifacts v${{ needs.publish.outputs.NPM_VERSION }}
uses: actions/upload-artifact@v4
with:
name: 'SHASUMS256.txt'
path: |
./SHASUMS256.txt
- name: Attach Bundle v${{ needs.publish.outputs.NPM_VERSION }}
uses: AButler/[email protected]
with:
files: 'homebridge-config-ui-x-${{ needs.publish.outputs.NPM_VERSION }}.tar.gz;SHASUMS256.txt'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: v${{ needs.publish.outputs.NPM_VERSION }}

github-releases-to-discord:
name: Discord Webhooks
needs: [publish,pre-release-alpha,attach-artifact]
uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
with:
title: "Homebridge UI Alpha Release"
description: |
Version `v${{ needs.publish.outputs.NPM_VERSION }}`
url: "https://github.com/homebridge/homebridge-config-ui-x/releases/tag/v${{ needs.publish.outputs.NPM_VERSION }}"
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_BETA }}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
inputs:
tag:
description: 'Tag - must not start with v'
description: 'Tag - please make it start with v'
required: true

jobs:
Expand All @@ -21,15 +21,6 @@ jobs:
with:
node-version: 20.x

# workflow_dispatch
# Sanity check to ensure that release tags don't start with a 'v' version prefix but adhere to the X.Y.Z format
- name: Check for Tag name Format ${{ github.event.inputs.tag }}
# https://github.com/orgs/community/discussions/25017
if: startsWith(github.event.inputs.tag, 'v')
run: |
echo "Release Tag name must not start with 'v', this was supplied ${{ github.event.inputs.tag }}"
exit 1
- name: Install package ${{ github.event.inputs.tag }}
if: github.event_name == 'workflow_dispatch'
run: |
Expand Down Expand Up @@ -86,32 +77,32 @@ jobs:
id: get_version
uses: jannemattila/get-version-from-tag@v3

- name: Install package ${{ steps.get_version.outputs.version }}
- name: Install package v${{ steps.get_version.outputs.version }}
if: github.event_name == 'release'
run: |
export npm_config_prefix=$(pwd)/package
npm install -g homebridge-config-ui-x@${{ steps.get_version.outputs.version }}
- name: Remove invalid node-pty node-gyp run ${{ steps.get_version.outputs.version }}
- name: Remove invalid node-pty node-gyp run v${{ steps.get_version.outputs.version }}
if: github.event_name == 'release'
run: |
rm -rf $(pwd)/package/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/build
- name: Create Bundle ${{ steps.get_version.outputs.version }}
- name: Create Bundle v${{ steps.get_version.outputs.version }}
if: github.event_name == 'release'
run: |
tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ steps.get_version.outputs.version }}.tar.gz .
shasum -a 256 homebridge-config-ui-x-${{ steps.get_version.outputs.version }}.tar.gz > SHASUMS256.txt
- name: Check Bundle ${{ steps.get_version.outputs.version }}
- name: Check Bundle v${{ steps.get_version.outputs.version }}
if: github.event_name == 'release'
run: |
if [ $(stat -c%s "homebridge-config-ui-x-${{ steps.get_version.outputs.version }}.tar.gz") -lt 10000000 ]; then
echo "Bundle is under 10MB, stopping"
exit 1
fi
- name: Upload tar.gz Bundle to GitHub Artifacts ${{ steps.get_version.outputs.version }}
- name: Upload tar.gz Bundle to GitHub Artifacts v${{ steps.get_version.outputs.version }}
if: github.event_name == 'release'
uses: actions/upload-artifact@v4
with:
Expand All @@ -120,18 +111,18 @@ jobs:
./homebridge-config-ui-x-${{ steps.get_version.outputs.version }}.tar.gz

- name: Upload SHASUMS256.txt to GitHub Artifacts ${{ steps.get_version.outputs.version }}
- name: Upload SHASUMS256.txt to GitHub Artifacts v${{ steps.get_version.outputs.version }}
if: github.event_name == 'release'
uses: actions/upload-artifact@v4
with:
name: 'SHASUMS256.txt'
path: |
./SHASUMS256.txt
- name: Attach Bundle ${{ steps.get_version.outputs.version }}
- name: Attach Bundle v${{ steps.get_version.outputs.version }}
if: github.event_name == 'release'
uses: AButler/[email protected]
with:
files: 'homebridge-config-ui-x-${{ steps.get_version.outputs.version }}.tar.gz;SHASUMS256.txt'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ steps.get_version.outputs.version }}
release-tag: v${{ steps.get_version.outputs.version }}
89 changes: 89 additions & 0 deletions .github/workflows/beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,92 @@ jobs:
install_cmd: npm ci && cd ui && npm ci
secrets:
npm_auth_token: ${{ secrets.npm_token }}

pre-release-beta:
needs: [publish]
name: "Create New Github Beta Pre Release"
if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create nightly release
id: create_release
uses: viperproject/create-nightly-release@v1
env:
# This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ needs.publish.outputs.NPM_VERSION }}
release_name: v${{ needs.publish.outputs.NPM_VERSION }}
body: |
v${{ needs.publish.outputs.NPM_VERSION }}
[How To Test Upcoming Changes](https://github.com/homebridge/homebridge-config-ui-x/wiki/How-To-Test-Upcoming-Changes)
keep_num: 0 # remove the just created release as well
keep_tags: false

attach-artifact:
name: Attach Artifact
needs: [publish, pre-release-beta]
runs-on: ubuntu-latest

steps:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Install package v${{ needs.publish.outputs.NPM_VERSION }}
run: |
export npm_config_prefix=$(pwd)/package
npm install -g homebridge-config-ui-x@${{ needs.publish.outputs.NPM_VERSION }}
- name: Remove invalid node-pty node-gyp run v${{ needs.publish.outputs.NPM_VERSION }}
run: |
rm -rf $(pwd)/package/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/build
- name: Create Bundle v${{ needs.publish.outputs.NPM_VERSION }}
run: |
tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ needs.publish.outputs.NPM_VERSION }}.tar.gz .
shasum -a 256 homebridge-config-ui-x-${{ needs.publish.outputs.NPM_VERSION }}.tar.gz > SHASUMS256.txt
- name: Check Bundle v${{ needs.publish.outputs.NPM_VERSION }}
run: |
if [ $(stat -c%s "homebridge-config-ui-x-${{ needs.publish.outputs.NPM_VERSION }}.tar.gz") -lt 10000000 ]; then
echo "Bundle is under 10MB, stopping"
exit 1
fi
- name: Upload tar.gz Bundle to GitHub Artifacts v${{ needs.publish.outputs.NPM_VERSION }}
uses: actions/upload-artifact@v4
with:
name: 'homebridge-config-ui-x-${{ needs.publish.outputs.NPM_VERSION }}.tar.gz'
path: |
./homebridge-config-ui-x-${{ needs.publish.outputs.NPM_VERSION }}.tar.gz

- name: Upload SHASUMS256.txt to GitHub Artifacts v${{ needs.publish.outputs.NPM_VERSION }}
uses: actions/upload-artifact@v4
with:
name: 'SHASUMS256.txt'
path: |
./SHASUMS256.txt
- name: Attach Bundle v${{ needs.publish.outputs.NPM_VERSION }}
uses: AButler/[email protected]
with:
files: 'homebridge-config-ui-x-${{ needs.publish.outputs.NPM_VERSION }}.tar.gz;SHASUMS256.txt'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: v${{ needs.publish.outputs.NPM_VERSION }}

github-releases-to-discord:
name: Discord Webhooks
needs: [publish,pre-release-beta,attach-artifact]
uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
with:
title: "Homebridge UI Beta Release"
description: |
Version `v${{ needs.publish.outputs.NPM_VERSION }}`
url: "https://github.com/homebridge/homebridge-config-ui-x/releases/tag/v${{ needs.publish.outputs.NPM_VERSION }}"
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_BETA }}

17 changes: 0 additions & 17 deletions .github/workflows/discord-webhooks.yml

This file was deleted.

14 changes: 13 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
secrets:
npm_auth_token: ${{ secrets.npm_token }}

build:
attach-artifact:
needs: [tag, publish]
if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }}
name: Attach Artifact ${{ needs.tag.outputs.version }}
Expand Down Expand Up @@ -105,3 +105,15 @@ jobs:
files: 'homebridge-config-ui-x-${{ needs.tag.outputs.version }}.tar.gz;SHASUMS256.txt'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ needs.tag.outputs.version }}

github-releases-to-discord:
name: Discord Webhooks
needs: [tag,build_and_test,publish,attach-artifact]
uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
with:
title: "Homebridge Release"
description: |
Version `v${{ needs.publish.outputs.NPM_VERSION }}`
url: "https://github.com/homebridge/homebridge-config-ui-x/releases/tag/v${{ needs.publish.outputs.NPM_VERSION }}"
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to `homebridge-config-ui-x` will be documented in this file. This project tries to adhere to [Semantic Versioning](http://semver.org/).

## v4.56.2 (2024-04-27)

### Other Changes

- Prepare for tags with prefex of `v
- Update Discord Webhook
- Update Pre Release Process

## v4.56.1 (2024-04-03)

### Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "homebridge-config-ui-x",
"displayName": "Homebridge UI",
"version": "4.56.1",
"version": "4.56.2",
"description": "A web based management, configuration and control platform for Homebridge.",
"license": "MIT",
"author": "oznu <[email protected]>",
Expand Down Expand Up @@ -159,4 +159,4 @@
"smart home",
"hb-service"
]
}
}
2 changes: 1 addition & 1 deletion src/modules/plugins/plugins.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ export class PluginsService {
pluginAction.version !== 'latest'
) {
try {
await this.httpService.head(`https://github.com/homebridge/homebridge-config-ui-x/releases/download/${pluginAction.version}/homebridge-config-ui-x-${pluginAction.version}.tar.gz`).toPromise();
await this.httpService.head(`https://github.com/homebridge/homebridge-config-ui-x/releases/download/v${pluginAction.version}/homebridge-config-ui-x-${pluginAction.version}.tar.gz` || `https://github.com/homebridge/homebridge-config-ui-x/releases/download/${pluginAction.version}/homebridge-config-ui-x-${pluginAction.version}.tar.gz`).toPromise();
return true;
} catch (e) {
return false;
Expand Down
Loading

0 comments on commit 1fac5ae

Please sign in to comment.