Feature/ci #2
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: build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: write | |
jobs: | |
build-m5dial-simple-pointer: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
~/.platformio/.cache | |
key: ${{ runner.os }}-pio | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install PlatformIO Core | |
run: pip install --upgrade platformio | |
- name: Build | |
run: | | |
cd m5dial-simple-pointer | |
cp src/ssid.h.template src/ssid.h | |
pio run | |
- name: Rename Firmware | |
if: startsWith(github.ref, 'refs/tags/m5dial-simple-pointer') | |
run: | | |
cp m5dial-simple-pointer/.pio/build/m5dial/firmware.elf ./m5dial-simple-pointer.elf | |
cp m5dial-simple-pointer/.pio/build/m5dial/firmware.bin ./m5dial-simple-pointer.bin | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/m5dial-simple-pointer') | |
with: | |
files: | | |
m5dial-simple-pointer.elf | |
m5dial-simple-pointer.bin | |
build-m5stackcore2-simple-pointer: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
~/.platformio/.cache | |
key: ${{ runner.os }}-pio | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install PlatformIO Core | |
run: pip install --upgrade platformio | |
- name: Build | |
run: | | |
cd m5stackcore2-simple-pointer | |
pio run | |
- name: Rename Firmware | |
if: startsWith(github.ref, 'refs/tags/m5stackcore2-simple-pointer') | |
run: | | |
cp m5stackcore2-simple-pointer/.pio/build/m5stack-core2/firmware.elf ./m5stackcore2-simple-pointer.elf | |
cp m5stackcore2-simple-pointer/.pio/build/m5stack-core2/firmware.bin ./m5stackcore2-simple-pointer.bin | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/m5stackcore2-simple-pointer') | |
with: | |
files: | | |
m5stackcore2-simple-pointer.elf | |
m5stackcore2-simple-pointer.bin | |
build-m5dial-pimoroni-trackball-compatible: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
~/.platformio/.cache | |
key: ${{ runner.os }}-pio | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install PlatformIO Core | |
run: pip install --upgrade platformio | |
- name: Build | |
run: | | |
cd m5dial-pimoroni-trackball-compatible | |
pio run | |
- name: Rename Firmware | |
if: startsWith(github.ref, 'refs/tags/m5dial-pimoroni-trackball-compatible') | |
run: | | |
cp m5dial-pimoroni-trackball-compatible/.pio/build/m5dial/firmware.elf ./m5dial-pimoroni-trackball-compatible.elf | |
cp m5dial-pimoroni-trackball-compatible/.pio/build/m5dial/firmware.bin ./m5dial-pimoroni-trackball-compatible.bin | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/m5dial-pimoroni-trackball-compatible') | |
with: | |
files: | | |
m5dial-pimoroni-trackball-compatible.elf m5dial-pimoroni-trackball-compatible.bin |