Skip to content

logo and homebridge text should link to status page #921

logo and homebridge text should link to status page

logo and homebridge text should link to status page #921

Workflow file for this run

name: Node-CI Beta
on:
push:
branches: [beta-*.*.*, beta]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build_and_test:
name: Build and run npm test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, macos-latest, macos-15, macos-14, macos-13, macos-12, windows-latest, windows-2022, windows-2019]
uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest
with:
enable_coverage: false
# # Code Coverage can only be used in a single run, not in a parallel run - Error: Bad response: 422 {"message":"Can't add a job to a build that is already closed. Build 6224987022 is closed. See docs.coveralls.io/parallel-builds","error":true}
# # Coveralls only expects to create a report once per build
runs_on: ${{ matrix.os }}
install_cmd: npm ci && cd ui && npm ci
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
publish:
needs: [build_and_test]
if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }}
uses: homebridge/.github/.github/workflows/npm-publish.yml@latest
with:
tag: beta
dynamically_adjust_version: true
npm_version_command: pre
pre_id: beta
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: 5
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 }}