31 lines
742 B
YAML
31 lines
742 B
YAML
name: Build Release
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install PlatformIO
|
|
run: pip install platformio
|
|
|
|
- name: Build firmware
|
|
run: |
|
|
VERSION="${GITHUB_REF_NAME#v}"
|
|
echo "Building version $VERSION"
|
|
PLATFORMIO_BUILD_FLAGS="-D CI_VERSION=\"$VERSION\"" pio run
|
|
|
|
- name: Create Release and Upload Firmware
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: .pio/build/esp32dev/firmware.bin
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |