This commit is contained in:
proddy
2021-03-14 17:33:07 +01:00
parent ed38a34151
commit 047a09c73d
6 changed files with 116 additions and 149 deletions

59
.github/workflows/pre_release.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
name: "pre-release"
on:
push:
branches:
- "dev"
jobs:
pre-release:
name: "Automatic pre-release build"
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Get build variables
id: build_info
run: |
version=`grep -E '^#define EMSESP_APP_VERSION' ./src/version.h | awk -F'"' '{print $2}'`
echo "::set-output name=version::$version"
platform=`grep -E '^#define EMSESP_PLATFORM' ./src/version.h | awk -F'"' '{print $2}'`
echo "::set-output name=platform::$platform"
- name: Compile locally
run: make
- name: Setup Python
uses: actions/setup-python@v2
- name: Install pio
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 firmware
run: |
platformio run -e ci
- name: Release
id: "automatic_releases"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
title: ${{steps.build_info.outputs.platform}} Development Build v${{steps.build_info.outputs.version}}
automatic_release_tag: "latest"
prerelease: true
files: |
CHANGELOG_DEV.md