Skip to content

Commit

Permalink
feat(ci): Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-w committed Apr 15, 2022
1 parent d27acdd commit af435ff
Show file tree
Hide file tree
Showing 8 changed files with 11,717 additions and 3,263 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/hacs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: HACS Validation

on:
push:
pull_request:

jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- name: HACS validation
uses: "hacs/action@main"
with:
category: "integration"
12 changes: 12 additions & 0 deletions .github/workflows/hassfest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: hassfest

on:
push:
pull_request:

jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: home-assistant/actions/hassfest@master
23 changes: 23 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release
on:
push:
branches:
- main

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: npm
node-version: 16
- run: |
mkdir -p dist/
cd custom_components/knx_panel
zip ../../dist/knx_panel.zip ./*
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea/
.idea/
dist/
19 changes: 19 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/github", {
"assets": [
{"path": "dist/knx_panel.zip", "label": "KNX Panel HACS distribution"}
]
}],
["semantic-release-plugin-update-version-in-files", {
"files": [
"frontend/package.json",
"custom_components/knx_panel/manifest.json"
],
"placeholder": "0.0.0"
}]
]
}
2 changes: 1 addition & 1 deletion custom_components/knx_panel/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "knx_panel",
"name": "KNX Custom Panel",
"version": "0.0.1",
"version": "0.0.0",
"dependencies": [
"panel_custom",
"http",
Expand Down
Loading

0 comments on commit af435ff

Please sign in to comment.