diff --git a/.github/workflows/arduino.yml b/.github/workflows/arduino.yml index 4d1df26..b879437 100644 --- a/.github/workflows/arduino.yml +++ b/.github/workflows/arduino.yml @@ -27,6 +27,12 @@ jobs: source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json sketch-paths: | - nostrZapLamp + cli-compile-flags: | + - --warnings="none" + - --build-property + - build.partitions=min_spiffs + - --build-property + - upload.maximum_size=1966080 libraries: | - name: WebSockets - name: ArduinoJson @@ -37,8 +43,6 @@ jobs: - name: Nostr # - name: QRCode # - name: ESP32Ping - cli-compile-flags: | - - --warnings="none" - uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41abfcd..b24b8c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,7 +49,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} tag: ${{ github.ref_name }} run: | - gh release create "$tag" --generate-notes ./dist/$tag/nostrZapLamp.ino.bootloader.bin \ + gh release create "$tag" --generate-notes ./build/nostrZapLamp.ino.bootloader.bin \ ./build/nostrZapLamp.ino.bin ./build/nostrZapLamp.ino.partitions.bin pages: diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 06fb91e..54ac71d 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -33,8 +33,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: copy main assets + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '16.x' + - name: build webinstaller run: sh build-webinstaller.sh + - name: npm install + run: npm install + - name: vite build + run: npx vite build - name: Setup Pages uses: actions/configure-pages@v3 - name: Upload artifact diff --git a/build-webinstaller.sh b/build-webinstaller.sh index 614ccea..9a1d4c0 100644 --- a/build-webinstaller.sh +++ b/build-webinstaller.sh @@ -1,24 +1,21 @@ #!/bin/sh -INSTALLER_PATH=./hardware-installer/src/firmware/esp32 -REPO=https://github.com/lnbits/nostr-zap-lamp/releases/download PROJECT_NAME=nostrZapLamp +REPO=https://github.com/lnbits/nostr-zap-lamp/releases/download +INSTALLER_PATH=./hardware-installer/src/firmware/esp32 git clone https://github.com/lnbits/hardware-installer -mkdir -p $INSTALLER_PATH + cp versions.json ./hardware-installer/src/versions.json +cp installer/config.js ./hardware-installer/src/config.js +cp installer/Hero.jsx ./hardware-installer/src/Hero.jsx +mkdir -p $INSTALLER_PATH for version in $(jq -r '.versions[]' ./hardware-installer/src/versions.json); do mkdir -p $INSTALLER_PATH/$version - wget $REPO/$version/bootloader.bin - mv bootloader.bin $INSTALLER_PATH/$version - wget $REPO/$version/boot_app0.bin - mv boot_app0.bin $INSTALLER_PATH/$version wget $REPO/$version/$PROJECT_NAME.ino.bin mv $PROJECT_NAME.ino.bin $INSTALLER_PATH/$version wget $REPO/$version/$PROJECT_NAME.ino.partitions.bin mv $PROJECT_NAME.ino.partitions.bin $INSTALLER_PATH/$version + wget $REPO/$version/$PROJECT_NAME.ino.bootloader.bin + mv $PROJECT_NAME.ino.bootloader.bin $INSTALLER_PATH/$version done - -cd hardware-installer -npm install -vite build diff --git a/installer/Hero.jsx b/installer/Hero.jsx new file mode 100644 index 0000000..65738f8 --- /dev/null +++ b/installer/Hero.jsx @@ -0,0 +1,8 @@ +export const Hero = () => { + return ( +