|
|
@@ -171,12 +171,63 @@ jobs:
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+#########################################################################################
|
|
|
+## Pack for a fresh install (USB flashing) (initial_esp32_setup)
|
|
|
+#########################################################################################
|
|
|
+ pack-for-fresh-install:
|
|
|
+ # creates old style binaries for fresh installation (backward compatible to wiki)
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ needs: build
|
|
|
+
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v2
|
|
|
+
|
|
|
+ - name: Get generated files from cache
|
|
|
+ uses: actions/cache@v3
|
|
|
+ with:
|
|
|
+ path: |
|
|
|
+ ./code/.pio/build/esp32cam/firmware.bin
|
|
|
+ ./code/.pio/build/esp32cam/partitions.bin
|
|
|
+ ./code/.pio/build/esp32cam/bootloader.bin
|
|
|
+ ./sd-card/html/version.txt
|
|
|
+ key: ${{ github.run_number }}
|
|
|
+
|
|
|
+ - name: Prepare artifacts for release
|
|
|
+ run: |
|
|
|
+ mkdir -p firmware
|
|
|
+ rm -rf firmware/*
|
|
|
+ mkdir -p release
|
|
|
+ # copy builds to firmware folder
|
|
|
+ cp -f "./code/.pio/build/esp32cam/firmware.bin" "firmware/firmware.bin"
|
|
|
+ cp -f "./code/.pio/build/esp32cam/bootloader.bin" "firmware/bootloader.bin"
|
|
|
+ cp -f "./code/.pio/build/esp32cam/partitions.bin" "firmware/partitions.bin"
|
|
|
+ zip -r ./firmware/sd-card.zip sd-card
|
|
|
+ cd ../firmware
|
|
|
+ zip -r ../release/initial_esp32_setup.zip .
|
|
|
+
|
|
|
+ - name: Upload initial_esp32_setup.zip artifact (Firmware + Bootloader + Partitions + Web UI)
|
|
|
+ uses: actions/upload-artifact@v3
|
|
|
+ with:
|
|
|
+ name: "initial_esp32_setup__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
|
|
|
+ path: ./firmware
|
|
|
+
|
|
|
+ - name: Store generated files in cache
|
|
|
+ uses: actions/cache@v3
|
|
|
+ with:
|
|
|
+ path: |
|
|
|
+ ./firmware
|
|
|
+ key: ${{ github.run_number }}-pack-for-fresh-install
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
#########################################################################################
|
|
|
## Prepare and create release
|
|
|
#########################################################################################
|
|
|
release:
|
|
|
runs-on: ubuntu-latest
|
|
|
- needs: pack-for-OTA-v2
|
|
|
+ needs: [pack-for-OTA-v2, pack-for-fresh-install]
|
|
|
|
|
|
steps:
|
|
|
- uses: actions/checkout@v2
|
|
|
@@ -192,6 +243,14 @@ jobs:
|
|
|
./dist
|
|
|
key: ${{ github.run_number }}-pack-for-OTA-v2
|
|
|
|
|
|
+ # import cached artifacts from pack-for-fresh-install
|
|
|
+ - name: Get generated files from cache
|
|
|
+ uses: actions/cache@v3
|
|
|
+ with:
|
|
|
+ path: |
|
|
|
+ ./firmware
|
|
|
+ key: ${{ github.run_number }}-pack-for-fresh-install
|
|
|
+
|
|
|
- name: Set Variables
|
|
|
id: vars
|
|
|
run: |
|
|
|
@@ -200,28 +259,13 @@ jobs:
|
|
|
|
|
|
- name: Prepare artifacts for release
|
|
|
run: |
|
|
|
- ls -la ./dist
|
|
|
- mkdir -p firmware
|
|
|
- rm -rf firmware/*
|
|
|
mkdir -p release
|
|
|
- # copy builds to firmware folder
|
|
|
- cp -f "./code/.pio/build/esp32cam/firmware.bin" "firmware/firmware.bin"
|
|
|
- cp -f "./code/.pio/build/esp32cam/bootloader.bin" "firmware/bootloader.bin"
|
|
|
- cp -f "./code/.pio/build/esp32cam/partitions.bin" "firmware/partitions.bin"
|
|
|
- zip -r ./firmware/sd-card.zip sd-card
|
|
|
# create a update.zip like "update__rolling"
|
|
|
cd ./dist
|
|
|
zip -r ../release/update.zip .
|
|
|
cd ../firmware
|
|
|
zip -r ../release/initial_esp32_setup.zip .
|
|
|
|
|
|
-
|
|
|
- - name: Upload initial_esp32_setup.zip artifact (Firmware + Bootloader + Partitions + Web UI)
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
- with:
|
|
|
- name: "initial_esp32_setup__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
|
|
|
- path: ./firmware
|
|
|
-
|
|
|
|
|
|
# extract the version used in next step
|
|
|
- id: get_version
|