Build ESPHome #13
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
name: Build ESPHome | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: Build ESPHome | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Checkout ESPHome | |
uses: actions/checkout@v3 | |
with: | |
repository: esphome/esphome | |
path: esphome | |
ref: release | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Install PlatformIO Core | |
run: | | |
pip install --upgrade platformio | |
- name: Install ESPHome | |
run: | | |
cd esphome/ | |
pip install . | |
- name: Get current date | |
id: date | |
run: | | |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
echo "datever=$(date +'%y.%m.%d')" >> $GITHUB_OUTPUT | |
- name: Build firmware binaries | |
run: | | |
bash build.sh ${{ steps.date.outputs.date }} | |
- name: Add GitHub release assets | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
build/*.* | |
tag_name: v${{ steps.date.outputs.datever }} | |
fail_on_unmatched_files: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |