-
Notifications
You must be signed in to change notification settings - Fork 383
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
1 parent
e11fc5a
commit 1fac5ae
Showing
11 changed files
with
217 additions
and
45 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
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 |
---|---|---|
|
@@ -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' | ||
|
@@ -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 }} |
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 |
---|---|---|
|
@@ -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: | ||
|
@@ -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: | | ||
|
@@ -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: | ||
|
@@ -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 }} |
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 |
---|---|---|
|
@@ -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 }} | ||
|
This file was deleted.
Oops, something went wrong.
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -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]>", | ||
|
@@ -159,4 +159,4 @@ | |
"smart home", | ||
"hb-service" | ||
] | ||
} | ||
} |
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
Oops, something went wrong.