diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..fc0ebae --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,85 @@ +name: Build + +on: + push: + branches: + - master + # tags: + # - "v*" + # pull_request: + # types: [ open, synchronize, edited, reopened, closed ] + +jobs: + build: + name: Build bins for ${{ matrix.pio_env }} + strategy: + # Ensure that a wheel builder finishes even if another fails + fail-fast: false + matrix: + pio_env: ['lcd_ssd1306', 'd32_pro_tft', 'tft_espi', 'm5stickc_plus'] + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3.3.0 + - run: git fetch --prune --unshallow + + - name: Cache pip + uses: actions/cache@v3.2.2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Cache PlatformIO + uses: actions/cache@v3.2.2 + with: + path: ~/.platformio + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + + - name: Set up Python + uses: actions/setup-python@v4.4.0 + + - name: Install PlatformIO + run: | + python -m pip install --upgrade pip + pip install --upgrade platformio + + - name: Build all environments + run: | + pio run -e ${{ matrix.pio_env }} + pio run -e ${{ matrix.pio_env }} --target buildfs + # sh ./copy_bins.sh + + - name: Copy files + run: | + cp .pio/build/${{ matrix.pio_env }}/firmware.bin bin/${{ matrix.pio_env }}_firmware.bin + cp .pio/build/${{ matrix.pio_env }}/partitions.bin bin/${{ matrix.pio_env }}_partitions.bin + cp .pio/build/${{ matrix.pio_env }}/spiffs.bin bin/${{ matrix.pio_env }}_spiffs.bin + + + # - name: "Create Prerelease" + # uses: "marvinpinto/action-automatic-releases@latest" + # with: + # repo_token: "${{ secrets.GITHUB_TOKEN }}" + # prerelease: true + # files: | + # LICENSE + # bin/*.bin + + - name: Create Draft Release + uses: softprops/action-gh-release@v1 + # if: startsWith(github.ref, 'refs/tags/') + with: + body: "Draft release" + # note you'll typically need to create a personal access token + # with permissions to create releases in the other repo + token: ${{ secrets.GITHUB_TOKEN }} + draft: true + prerelease: true + files: | + LICENSE + bin/*.bin + env: + GITHUB_REPOSITORY: thorrak/tiltbridge \ No newline at end of file diff --git a/data/settings.htm b/data/settings.htm index 76a0d0a..93a1c7f 100644 --- a/data/settings.htm +++ b/data/settings.htm @@ -112,6 +112,7 @@ Brewstatus Taplist.io MQTT + Generic JSON Target @@ -536,6 +537,36 @@
+ These settings control how TiltBridge talks to a user-defined target. Specify a url + here and TiltBridge will send a +
+ +