Files
EMS-ESP32/.github/workflows/build_firmware.yml
2020-10-29 21:02:17 +01:00

72 lines
1.7 KiB
YAML

name: Build Firmware
on:
push:
branches:
- dev
tags:
# - '*.*.*'
paths:
- 'CHANGELOG_DEV.md'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Version
id: fetch_version
run: |
version=`grep -E '^#define EMSESP_APP_VERSION' ./src/version.h | awk '{print $3}' | sed 's/"//g'`
echo "::set-output name=s::$version"
- name: Setup Python
uses: actions/setup-python@v1
- name: Install
run: |
python -m pip install --upgrade pip
pip install -U platformio
platformio upgrade
platformio update
- name: Build web
run: |
cd interface
npm install
npm run build
- name: Build images
run: |
platformio run -e esp8266
platformio run -e esp32
- name: Delete
uses: dev-drprasad/delete-tag-and-release@v0.1.2
# if: startsWith(github.ref, 'refs/tags/')
with:
delete_release: true
tag_name: dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Changelog
run: cat RELEASENOTES_DEV.md CHANGELOG_DEV.md > BODY.txt
- name: Release
uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
with:
body: Latest beta build
body_path: BODY.txt
name: Development Build version ${{steps.fetch_version.outputs.s}}
tag_name: dev
prerelease: true
files: |
./build/firmware/*.*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}