-
Notifications
You must be signed in to change notification settings - Fork 50
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 #79 from esphome/dev
- Loading branch information
Showing
16 changed files
with
120 additions
and
125 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Build ${{ matrix.name }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- name: Captive Portal | ||
directory: captive-portal | ||
- name: Webserver v2 | ||
directory: v2 | ||
- name: Webserver v3 | ||
directory: v3 | ||
steps: | ||
- name: Clone the repo | ||
uses: actions/[email protected] | ||
- name: Set up Node.JS | ||
uses: actions/[email protected] | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Build ${{ matrix.name }} | ||
run: npm run build | ||
working-directory: packages/${{ matrix.directory }} |
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,69 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build ${{ matrix.name }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- name: Captive Portal | ||
directory: captive-portal | ||
- name: Webserver v2 | ||
directory: v2 | ||
- name: Webserver v3 | ||
directory: v3 | ||
steps: | ||
- name: Clone the repo | ||
uses: actions/[email protected] | ||
|
||
- name: Set up Node.JS | ||
uses: actions/[email protected] | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build ${{ matrix.name }} | ||
run: npm run build | ||
working-directory: packages/${{ matrix.directory }} | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
name: ${{ matrix.name }} | ||
path: _static/**/*.h | ||
|
||
release: | ||
name: Tag and Release | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
# Checkout repo, create new git tag, and git release with artifacts | ||
- name: Checkout the repo | ||
uses: actions/[email protected] | ||
|
||
- name: Create a new tag | ||
id: create_tag | ||
run: echo tag=$(date +'%Y%m%d-%H%M%S') >> $GITHUB_OUTPUT | ||
|
||
- name: Download Artifacts | ||
uses: actions/[email protected] | ||
with: | ||
path: headers | ||
merge-multiple: true | ||
|
||
- name: List files | ||
run: ls -R headers | ||
|
||
- name: Create a release | ||
id: create_release | ||
uses: softprops/[email protected] | ||
with: | ||
tag_name: ${{ steps.create_tag.outputs.tag }} | ||
name: Release ${{ steps.create_tag.outputs.tag }} | ||
files: headers/**/*.h | ||
generate_release_notes: true |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
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
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 |
---|---|---|
@@ -1,18 +1,19 @@ | ||
#!/bin/bash | ||
cat <<EOT > ./$1/$2 | ||
cat <<EOT >./$1/$2 | ||
#pragma once | ||
// Generated from https://github.com/esphome/esphome-webserver | ||
$(if [ -n "$4" ]; then echo "#if USE_WEBSERVER_VERSION == $4"; fi) | ||
#include "esphome/core/hal.h" | ||
namespace esphome { | ||
namespace $3 { | ||
EOT | ||
echo "const uint8_t INDEX_GZ[] PROGMEM = {" >> ./$1/$2 | ||
xxd -cols 19 -i $1/index.html.gz | sed -e '2,$!d' -e 's/^/ /' -e '$d' | sed -e '$d' | sed -e '$s/$/};/' >> ./$1/$2 | ||
cat <<EOT >> ./$1/$2 | ||
echo "const uint8_t INDEX_GZ[] PROGMEM = {" >>./$1/$2 | ||
xxd -cols 19 -i $1/index.html.gz | sed -e '2,$!d' -e 's/^/ /' -e '$d' | sed -e '$d' | sed -e '$s/$/};/' >>./$1/$2 | ||
cat <<EOT >>./$1/$2 | ||
} // namespace $3 | ||
} // namespace esphome | ||
$(if [ -n "$4" ]; then echo "#endif"; fi) | ||
EOT | ||
ls -l ./$1/$2 |