Watchy/.github/workflows/main.actions.yml

39 lines
1.3 KiB
YAML
Raw Normal View History

2023-04-23 23:28:57 -04:00
name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
name: Build and Release
runs-on: ubuntu-latest
2024-04-03 14:55:30 -04:00
strategy:
matrix:
board-revisions: [v10, v15, v20]
2023-04-23 23:28:57 -04:00
steps:
- uses: actions/checkout@master
- uses: ArminJo/arduino-test-compile@v3
with:
2024-04-03 14:55:30 -04:00
arduino-board-fqbn: esp32:esp32:watchy:Revision=${{ matrix.board-revisions }},PartitionScheme=min_spiffs,UploadSpeed=921600,DebugLevel=none,EraseFlash=none
2023-04-23 23:28:57 -04:00
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
required-libraries: Adafruit GFX Library,Arduino_JSON,DS3232RTC,NTPClient,Rtc_Pcf8563,GxEPD2,WiFiManager
set-build-path: true
2024-04-03 14:55:30 -04:00
- name: Rename binaries with board revision
run: |
2024-04-03 16:15:58 -04:00
parent_dir="${{ github.workspace }}/examples/WatchFaces"
2024-04-03 15:57:14 -04:00
for dir in "$parent_dir"/*; do
if [ -d "$dir" ]; then
2024-04-03 16:15:58 -04:00
cd "$dir/build"
2024-04-03 15:57:14 -04:00
for file in *; do
name="${file%%.*}"
ext="${file#$name.}"
mv "$file" "$name-${{ matrix.board-revisions }}.$ext"
done
cd -
fi
2024-04-03 14:55:30 -04:00
done
2023-04-23 23:28:57 -04:00
- uses: softprops/action-gh-release@v1
with:
name: "Watchy Arduino Library ${{ github.ref_name }}"
files: ${{ github.workspace }}/examples/WatchFaces/**/build/*.bin