Files
2025-08-01 17:04:17 +02:00

50 lines
1.3 KiB
YAML

on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build firmware and filesystem
run: |
pio run -e esp32thing_CI
pio run -e esp32thing_CI -t buildfs
- name: Rename firmware and filesystem images
run: |
cp .pio/build/esp32thing_CI/firmware.bin firmware.bin
cp .pio/build/esp32thing_CI/spiffs.bin spiffs.bin
- name: Generate tag name
id: tag
run: |
TAG="esp32thing-$(date +'%Y%m%d-%H%M%S')-${GITHUB_SHA::7}"
echo "tag_name=$TAG" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: "esp32thing Firmware ${{ steps.tag.outputs.tag_name }}"
tag_name: "${{ steps.tag.outputs.tag_name }}"
files: |
firmware.bin
spiffs.bin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}