v1.2.0 #6
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: Firmware release | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
~/.platformio/.cache | |
key: ${{ runner.os }}-pio | |
- name: Extract build version | |
id: get_version | |
uses: battila7/get-version-action@v2 | |
- run: echo "VERSION=${{ steps.get_version.outputs.version-without-v }}" >> $GITHUB_ENV | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
- name: Install PlatformIO Core | |
run: python -m pip install -r requirements.txt | |
- name: Build PlatformIO Project | |
run: pio run | |
env: | |
PLATFORMIO_BUILD_FLAGS: -D SPECIFIC_MACRO -I/extra/inc | |
VERSION: ${{ steps.get_version.outputs.version-without-v }} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
.pio/build/*/firmware_*.bin | |
.pio/build/*/firmware_*.bin.gz |