Skip to content

v1.0.2 - Improves Encoder Tick Management #13

v1.0.2 - Improves Encoder Tick Management

v1.0.2 - Improves Encoder Tick Management #13

Workflow file for this run

name: Build Photon
on:
workflow_dispatch:
release:
types: [ published ]
jobs:
build:
name: Build and Upload
runs-on: ubuntu-20.04
steps:
- name: Check out the PR
uses: actions/checkout@v3
- name: Select Python 3.7
uses: actions/setup-python@v3
with:
python-version: '3.7'
architecture: 'x64'
- name: Generate Short SHA Environment Variable
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Install PlatformIO
run: |
pip install -U platformio
pio upgrade --dev
pio pkg update --global
- name: Compile Artifacts for Release
if: github.event_name == 'release'
run: |
cd photon && pio run
cp .pio/build/lumenpnp-feeder/firmware.bin photon-lumenpnp-${{ github.event.release.tag_name }}.bin
cp .pio/build/lumenpnp-feeder/firmware.elf photon-lumenpnp-${{ github.event.release.tag_name }}.elf
- name: Upload Artifacts to Release
uses: softprops/action-gh-release@v1
if: github.event_name == 'release'
with:
files: |
photon/photon-lumenpnp-${{ github.event.release.tag_name }}.bin
photon/photon-lumenpnp-${{ github.event.release.tag_name }}.elf
- name: Compile Artifacts for Workflow Dispatch
if: github.event_name != 'release'
run: |
cd photon && pio run
cp .pio/build/lumenpnp-feeder/firmware.bin photon-lumenpnp-test.bin
- name: Upload Artifacts to Workflow Dispatch
if: github.event_name != 'release'
uses: actions/upload-artifact@v2
with:
name: photon-lumenpnp-test.bin
path: photon/photon-lumenpnp-test.bin