Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerdiyde committed Nov 21, 2024
1 parent c61b36b commit 8c61537
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 38 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/esphome-build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and Release ESPHome Firmware

on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up ESPHome
uses: esphome/esphome-action@v2
with:
install_version: latest

- name: Create output directory
run: mkdir -p firmwares

- name: Compile all YAML files
run: |
find . -name "*.yaml" | while read -r yaml_file; do
echo "Compiling $yaml_file"
esphome compile "$yaml_file"
cp .esphome/build/*/*.bin firmwares/ || true
done
- name: Upload firmware artifacts
uses: actions/upload-artifact@v3
with:
name: firmware-binaries
path: firmwares/

release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download firmware artifacts
uses: actions/download-artifact@v3
with:
name: firmware-binaries
path: firmwares/

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: firmwares/*
38 changes: 0 additions & 38 deletions .gitlab-ci.yaml

This file was deleted.

0 comments on commit 8c61537

Please sign in to comment.