Skip to content

Commit

Permalink
Merge e230d29 into 0847721
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed May 1, 2023
2 parents 0847721 + e230d29 commit 8dddb83
Show file tree
Hide file tree
Showing 14 changed files with 1,347 additions and 1,187 deletions.
21 changes: 21 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The GitHub release configuration file: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes

changelog:
categories:
- title: Breaking Changes 🛠
labels:
- 'breaking change'
- title: Featured Changes ✨
labels:
- 'feature'
- 'enhancement'
- title: Bug Fixes 🐛
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: Other Changes
labels:
- "chore"
- "housekeeping"
- "*"
38 changes: 38 additions & 0 deletions .github/workflows/attach-artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Attach Artifacts

on:
release:
types: [published]

jobs:
build:
name: Attach Artifact
runs-on: ubuntu-latest

steps:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 16.x

# 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
if: startWith(${{github.event.release.tag_name}}, 'v')
run: |
echo "Tag name must not start with 'v' Prefix"
exit 1
- name: Install package
run: |
export npm_config_prefix=$(pwd)/package
npm install -g homebridge-config-ui-x@${{ github.event.release.tag_name }}
- name: Create Bundle
run: |
tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz .
shasum -a 256 homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz > SHASUMS256.txt
- name: Attach Bundle
uses: AButler/upload-release-assets@v2.0
with:
files: 'homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz;SHASUMS256.txt'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.event.release.tag_name }}
7 changes: 6 additions & 1 deletion .github/workflows/beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ jobs:
uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@main
with:
enable_coverage: true
install_cmd: npm ci && cd ui && npm ci
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

lint:
needs: build_and_test
uses: homebridge/.github/.github/workflows/eslint.yml@main
with:
install_cmd: npm ci && cd ui && npm ci

publish:
needs: lint
Expand All @@ -26,6 +30,7 @@ jobs:
tag: 'test'
dynamically_adjust_version: true
npm_version_command: 'pre'
pre_id: 'beta'
pre_id: 'test'
install_cmd: npm ci && cd ui && npm ci
secrets:
npm_auth_token: ${{ secrets.npm_token }}
62 changes: 61 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,71 @@ on:

jobs:
build_and_test:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-2019 ]

uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@main
with:
enable_coverage: true
runs_on: ${{ matrix.os }}
install_cmd: npm ci && cd ui && npm ci
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
lint:

test_hb_service:
needs: build_and_test
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-2019 ]
node-version: [ 16.x, 18.x ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
registry-url: 'https://registry.npmjs.org'
cache: 'npm'

- run: npm ci
- run: npm run build:server

# remove dev deps
- run: npm clean-install --production

# test hb-service
- run: node dist/bin/hb-service.js -v
- if: runner.os == 'Linux'
name: 'Run hb-service install (Linux)'
run: |
sudo npm link
sudo npm install -g homebridge
sudo hb-service install --user homebridge
sleep 30
- if: runner.os == 'macOS'
name: 'Run hb-service install (macOS)'
run: |
sudo npm link
sudo npm install -g homebridge
sudo hb-service install
sleep 30
- if: runner.os == 'Windows'
name: 'Run hb-service install (Windows)'
run: |
npm link
npm install -g homebridge
hb-service install
Start-Sleep -s 30
- name: 'Test hb-service install'
run: node dist/bin/hb-service.js status --port 8581

lint:
uses: homebridge/.github/.github/workflows/eslint.yml@main
with:
install_cmd: npm ci && cd ui && npm ci
12 changes: 12 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: PR Labeler

on:
pull_request: # required for auto labeler
types: [opened, reopened, synchronize]
workflow_dispatch:

jobs:
stale:
uses: homebridge/.github/.github/workflows/pr-labeler.yml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
58 changes: 0 additions & 58 deletions .github/workflows/publish.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/release-drafter.ym

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ jobs:
if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }}

uses: homebridge/.github/.github/workflows/npm-publish.yml@main
with:
install_cmd: npm ci && cd ui && npm ci
secrets:
npm_auth_token: ${{ secrets.npm_token }}
60 changes: 0 additions & 60 deletions .github/workflows/test.yml

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tag-version-prefix=""
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ You should now be able to navigate to `https://localhost:4200` in your browser w
If you have made changes to the server side code, you should run the e2e test suite before creating a pull request:

```
npm run test:e2e
npm run test
```

## Contributing To Translations
Expand Down
Loading

0 comments on commit 8dddb83

Please sign in to comment.