mirror of
https://github.com/athom-tech/esp32-configs.git
synced 2026-10-26 22:10:21 +00:00
update ci
This commit is contained in:
1 parent
2655ad5e0d
commit
80cbae7584
7 files changed
+151
-46
No files matched your search
+31
-14
@@ -2,28 +2,45 @@ name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '*.yaml'
|
||||
- '.github/workflows/ci.yml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: Building ${{ matrix.file }}
|
||||
name: Building ${{ matrix.file }} / ${{ matrix.esphome-version }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 3
|
||||
matrix:
|
||||
#### Modify below here to match your project ####
|
||||
file:
|
||||
- athom-2ch-relay-board.yaml
|
||||
- athom-4ch-relay-board.yaml
|
||||
- athom-8ch-relay-board.yaml
|
||||
- athom-energy-monitor-x2.yaml
|
||||
- athom-energy-monitor-x6.yaml
|
||||
- athom-garage-door.yaml
|
||||
- athom-mini-relay-v2.yaml
|
||||
- athom-smart-plug.yaml
|
||||
- athom-zigbee-gateway.yaml
|
||||
- athom-presence-sensor-v3.yaml
|
||||
- athom-2ch-relay-board
|
||||
- athom-4ch-relay-board
|
||||
- athom-8ch-relay-board
|
||||
- athom-energy-monitor-x2
|
||||
- athom-energy-monitor-x6
|
||||
- athom-garage-door
|
||||
- athom-mini-relay-v2
|
||||
- athom-smart-plug
|
||||
- athom-zigbee-gateway
|
||||
- athom-presence-sensor-v3
|
||||
#### Modify above here to match your project ####
|
||||
|
||||
esphome-version:
|
||||
- stable
|
||||
- beta
|
||||
- dev
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v4.1.7
|
||||
- name: Build ESPHome firmware to verify configuration
|
||||
uses: esphome/build-action@v4.0.1
|
||||
- name: ESPHome ${{ matrix.esphome-version }}
|
||||
uses: esphome/build-action@v4.0.3
|
||||
with:
|
||||
yaml-file: ${{ matrix.file }}
|
||||
yaml-file: ${{ matrix.file }}.yaml
|
||||
version: ${{ matrix.esphome-version }}
|
||||
@@ -0,0 +1,41 @@
|
||||
name: Publish Firmware
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-firmware:
|
||||
name: Build Firmware
|
||||
uses: esphome/workflows/.github/workflows/build.yml@2024.12.0
|
||||
with:
|
||||
#### Modify below here to match your project ####
|
||||
files: |
|
||||
athom-2ch-relay-board.yaml
|
||||
athom-4ch-relay-board.yaml
|
||||
athom-8ch-relay-board.yaml
|
||||
athom-energy-monitor-x2.yaml
|
||||
athom-energy-monitor-x6.yaml
|
||||
athom-garage-door.yaml
|
||||
athom-mini-relay-v2.yaml
|
||||
athom-smart-plug.yaml
|
||||
athom-zigbee-gateway.yaml
|
||||
athom-presence-sensor-v3.yaml
|
||||
esphome-version: 2024.10.3
|
||||
combined-name: Athom-ESP32-Device
|
||||
#### Modify above here to match your project ####
|
||||
|
||||
release-summary: ${{ github.event.release.body }}
|
||||
release-url: ${{ github.event.release.html_url }}
|
||||
release-version: ${{ github.event.release.tag_name }}
|
||||
|
||||
upload-to-release:
|
||||
name: Upload to Release
|
||||
uses: esphome/workflows/.github/workflows/upload-to-gh-release.yml@2024.12.0
|
||||
needs:
|
||||
- build-firmware
|
||||
with:
|
||||
version: ${{ github.event.release.tag_name }}
|
||||
@@ -0,0 +1,72 @@
|
||||
name: Publish Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'static/**'
|
||||
- '.github/workflows/publish-pages.yml'
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Publish Firmware
|
||||
types:
|
||||
- completed
|
||||
pull_request:
|
||||
paths:
|
||||
- 'static/**'
|
||||
- '.github/workflows/publish-pages.yml'
|
||||
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- run: mkdir -p output/firmware
|
||||
|
||||
- name: Build
|
||||
uses: actions/jekyll-build-pages@v1.0.13
|
||||
with:
|
||||
source: ./static
|
||||
destination: ./output
|
||||
|
||||
- name: Fetch firmware files
|
||||
uses: robinraju/release-downloader@v1.11
|
||||
with:
|
||||
latest: true
|
||||
fileName: '*'
|
||||
out-file-path: output/firmware
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3.0.1
|
||||
with:
|
||||
path: output
|
||||
retention-days: 1
|
||||
|
||||
publish:
|
||||
if: github.event_name != 'pull_request'
|
||||
name: Publish
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5.0.0
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4.0.5
|
||||
@@ -1,25 +0,0 @@
|
||||
name: Build and Publish ESPHome firmware and website
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: esphome/workflows/.github/workflows/publish.yml@main
|
||||
with:
|
||||
# CHANGEME: Set the filenames of your config files here:
|
||||
files:
|
||||
athom-2ch-relay-board.yaml,
|
||||
athom-4ch-relay-board.yaml,
|
||||
athom-8ch-relay-board.yaml,
|
||||
athom-energy-monitor-x2.yaml,
|
||||
athom-energy-monitor-x6.yaml,
|
||||
athom-garage-door.yaml,
|
||||
athom-mini-relay-v2.yaml,
|
||||
athom-smart-plug.yaml,
|
||||
athom-zigbee-gateway.yaml,
|
||||
athom-presence-sensor-v3.yaml
|
||||
# CHANGEME: Set the name of your project here:
|
||||
name: Athom ESP32 Device
|
||||
@@ -6,11 +6,11 @@ substitutions:
|
||||
# Allows ESP device to be automatically linked to an 'Area' in Home Assistant. Typically used for areas such as 'Lounge Room', 'Kitchen' etc
|
||||
room: ""
|
||||
# Description as appears in ESPHome & top of webserver page
|
||||
device_description: "athom ps01c3 mmwave radar human presence sensor"
|
||||
device_description: "athom esp32-c3 mmwave radar human presence sensor"
|
||||
# Project Name
|
||||
project_name: "Athom Technology.Athom PS01C3 Presence Sensor"
|
||||
# Projection version denotes the release version of the yaml file, allowing checking of deployed vs latest version
|
||||
project_version: "v3.0.2"
|
||||
project_version: "v3.0.3"
|
||||
# Define a domain for this device to use. i.e. iot.home.lan (so device will appear as athom-smart-plug-v2.iot.home.lan in DNS/DHCP logs)
|
||||
dns_domain: ".local"
|
||||
# Set timezone of the smart plug. Useful if the plug is in a location different to the HA server. Can be entered in unix Country/Area format (i.e. "Australia/Sydney")
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
# CHANGEME: Set these variable to your liking
|
||||
title: ESPHome Project Template
|
||||
title: Athom Technology ESPHome Project
|
||||
description: Powered by ESPHome and ESP Web Tools
|
||||
theme: jekyll-theme-slate
|
||||
theme: jekyll-theme-slate
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
# About
|
||||
|
||||
Add some information about your project here.
|
||||
ESPhome project by Shenzhen Athom Technology Co., Ltd., China.
|
||||
|
||||
# Installation
|
||||
|
||||
You can use the button below to install the pre-built firmware directly to your device via USB from the browser.
|
||||
|
||||
<esp-web-install-button manifest="./manifest.json"></esp-web-install-button>
|
||||
<esp-web-install-button manifest="firmware/Athom-ESP32-Device.manifest.json"></esp-web-install-button>
|
||||
|
||||
<script type="module" src="https://unpkg.com/esp-web-tools@9/dist/web/install-button.js?module"></script>
|
||||
<script type="module" src="https://unpkg.com/esp-web-tools@10/dist/web/install-button.js?module"></script>
|
||||
Reference in new issue
Block a user