trialling new build-flag method for versioning #2
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: Check PIO buildability on PR into main branch | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
pio-build: | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: ${{ github.token }} | |
steps: | |
- uses: actions/checkout | |
- name: Update OTA_VERSION | |
run: | | |
echo "export PLATFORMIO_BUILD_FLAGS='-DOTA_VERSION=\"cicd_build\"'" >> $GITHUB_ENV | |
- name: Set up PlatformIO | |
run: | | |
sudo apt-get install -y python3-pip | |
pip3 install platformio | |
shell: bash | |
- name: Build Firmware | |
run: pio run -e esp32 | |
- name: Check Build Status | |
run: exit $? |