ebus store schedule - ready for review #297
Workflow file for this run
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: PlatformIO CI | |
on: | |
push: | |
tags: | |
- v[1-9]* | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Cache PlatformIO | |
uses: actions/cache@v2 | |
with: | |
path: ~/.platformio | |
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
- name: Install PlatformIO | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade platformio | |
- name: Prepare release dir | |
run: mkdir release | |
- name: Build v5.x | |
run: pio run -e esp32-c3 ; cp .pio/build/esp32-c3/firmware.bin release/firmware-HW_v5.x-${GITHUB_SHA::6}.bin | |
- name: Assemble v5.x fullflash | |
run: ./fullflash.sh ; mv firmware-fullflash-HW_v5.x.bin release/firmware-fullflash-HW_v5.x-${GITHUB_SHA::6}.bin | |
- name: Build v4.x | |
run: pio run -e esp12e ; mv .pio/build/esp12e/firmware.bin release/firmware-HW_v4.x-${GITHUB_SHA::6}.bin | |
- name: Build v3.0 | |
run: pio run -e esp12e-v3 ; mv .pio/build/esp12e-v3/firmware.bin release/firmware-HW_v3.x-${GITHUB_SHA::6}.bin | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
path: release | |
release: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/[email protected] | |
with: | |
path: release | |
- name: Create release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "release/artifact/*" | |