forked from klaasnicolaas/home-assistant-glow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request klaasnicolaas#517 from klaasnicolaas/release/v4.1.0
Release v4.1.0
- Loading branch information
Showing
17 changed files
with
378 additions
and
211 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
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 |
---|---|---|
@@ -0,0 +1,108 @@ | ||
--- | ||
# Build & Deploy the ESPHome firmwares for the Home Assistant Glow project. | ||
name: Deploy firmware | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
workflow_dispatch: | ||
inputs: | ||
release-tag: | ||
description: "Release tag" | ||
default: "x.x.x" | ||
required: true | ||
type: string | ||
release-url: | ||
description: "Release URL" | ||
default: "https://github.com" | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build-firmware: | ||
if: ${{ github.event.ref == 'refs/heads/main' }} | ||
uses: klaasnicolaas/home-assistant-glow/.github/workflows/build-firmware.yaml@main | ||
name: Firmware | ||
with: | ||
release-url: ${{ github.event.release.html_url || inputs.release-url }} | ||
|
||
combined-manifests: | ||
name: Combine ${{ matrix.project }} manifests | ||
runs-on: ubuntu-latest | ||
needs: build-firmware | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- project: home-assistant-glow | ||
name: Home Assistant Glow | ||
steps: | ||
- name: ⤵️ Download specific artifacts | ||
uses: actions/download-artifact@v4.1.7 | ||
with: | ||
pattern: build-${{ matrix.project }}-* | ||
merge-multiple: true | ||
path: files | ||
- name: 🔨 Generate device manifest.json | ||
run: | | ||
version=${{ github.event.release.tag_name || inputs.release-tag }} | ||
jq -s --arg version "$version" '{"name": "${{ matrix.name }}", "version": $version, "home_assistant_domain": "esphome", "builds":.}' files/*/manifest.json > files/manifest.json | ||
- name: 🧪 Display structure of job | ||
run: ls -R | ||
- name: ⬆️ Upload project artifact | ||
uses: actions/upload-artifact@v4.3.3 | ||
with: | ||
name: ${{ matrix.project }} | ||
path: files | ||
retention-days: 1 | ||
|
||
build-docs: | ||
name: Build documentation | ||
if: contains(fromJSON('["workflow_dispatch", "release"]'), github.event_name) && github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
needs: combined-manifests | ||
steps: | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/checkout@v4.1.7 | ||
- name: ⬇️ Download all artifacts | ||
uses: actions/download-artifact@v4.1.7 | ||
with: | ||
pattern: "!build-*" | ||
path: output | ||
- name: 🗂️ Move firmware folders to static | ||
run: mv output/* docs/static | ||
- name: 🧪 Display structure of job | ||
run: ls -R | ||
|
||
- name: 🏗️ Set up Node.js | ||
uses: actions/setup-node@v4.0.2 | ||
with: | ||
node-version: 20.x | ||
- name: 🏗️ Install Docusaurus dependencies | ||
run: npm install --frozen-lockfile --non-interactive | ||
working-directory: docs | ||
- name: 🚀 Build Docusaurus | ||
run: npm run build | ||
working-directory: docs | ||
- name: ⬆️ Upload pages artifacts | ||
uses: actions/upload-pages-artifact@v3.0.1 | ||
with: | ||
path: docs/build | ||
|
||
deploy: | ||
name: Deploy to GitHub Pages | ||
runs-on: ubuntu-latest | ||
needs: build-docs | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: 🏗️ Setup Github Pages | ||
uses: actions/configure-pages@v5.0.0 | ||
- name: 🚀 Deploy to Github Pages | ||
uses: actions/deploy-pages@v4.0.5 | ||
id: deployment |
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
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
push: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
update_release_draft: | ||
|
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# OTA configuration # | ||
ota: | ||
- platform: esphome | ||
id: ota_esphome | ||
- platform: http_request | ||
id: ota_http_request | ||
|
||
update: | ||
- platform: http_request | ||
name: Firmware Update | ||
source: https://glow-energy.io/home-assistant-glow/manifest.json | ||
|
||
http_request: | ||
timeout: 10s | ||
verify_ssl: false |
Oops, something went wrong.