Skip to content

Commit

Permalink
Update readme and builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ajagnanan committed Apr 22, 2023
1 parent b7f3a99 commit 9eff089
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---

<!-- READ THIS FIRST:
- If you need additional help with this template please refer to https://www.home-assistant.io/help/reporting_issues/
- Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/home-assistant/releases
- Provide as many details as possible. Do not delete any text from this template!
-->

**Checklist:**

- [ ] I updated to the latest version available
- [ ] I cleared the cache of my browser

**Release with the issue:**

**Last working release (if known):**

**Browser and Operating System:**

<!--
Provide details about what browser (and version) you are seeing the issue in. And also which operating system this is on. If possible try to replicate the issue in other browsers and include your findings here.
-->

**Description of problem:**

<!--
Explain what the issue is, and how things should look/behave. If possible provide a screenshot with a description.
-->

**Javascript errors shown in the web inspector (if applicable):**

```
```

**Additional information:**
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Build"

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Test build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache Dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- uses: actions/upload-artifact@v1
with:
name: settings-sync.js
path: dist/settings-sync.js
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
release:
types: [published]

jobs:
release:
name: Prepare release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

# Build
- name: Cache Dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build

# Upload build file to the releas as an asset.
- name: Upload zip to release
uses: svenstaro/upload-release-action@v1-release

with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/settings-sync.js
asset_name: settings-sync.js
tag: ${{ github.ref }}
overwrite: true
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ resources:
| type | string | **Required** | `custom:custom:settings-sync` |
| enabled | boolean | **Required** | Enable card |
| sensor | sensor | **Required** | The Sensor that holds the User Settings JSON retrieved by the REST API |
| username | string | **Optional** | Optional Username or default is the Logged In User |
| username | string | **Optional** | Optional Username or default is the Logged In User (this matches up with the JSON) |

[commits-shield]: https://img.shields.io/github/commit-activity/y/ajagnanan/ha-settings-sync.svg?style=for-the-badge
[commits]: https://github.com/ajagnanan/ha-settings-sync/commits/master
Expand All @@ -39,6 +39,15 @@ resources:
[releases-shield]: https://img.shields.io/github/release/ajagnanan/ha-settings-sync.svg?style=for-the-badge
[releases]: https://github.com/ajagnanan/ha-settings-sync/releases

## Configuration

```yaml
type: custom:settings-sync
enabled: true
sensor: sensor.settings_sync
username: admin
```

## References

Project based on: https://community.home-assistant.io/t/wth-why-most-settings-are-browser-instance-dependant/468419/16

0 comments on commit 9eff089

Please sign in to comment.