Frank Haverland 4 лет назад
Родитель
Сommit
50b9983534
1 измененных файлов с 10 добавлено и 23 удалено
  1. 10 23
      .github/workflows/build.yaml

+ 10 - 23
.github/workflows/build.yaml

@@ -17,7 +17,7 @@ jobs:
     - name: Set Variables
       id: vars
       run: |
-        echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
+        echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
 
     - name: Cache PlatformIO
       uses: actions/cache@v3
@@ -74,24 +74,23 @@ jobs:
     - name: Set Variables
       id: vars
       run: |
-        echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
+        echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
 
     - name: Rename firmware file to contain versioning (old ota)
       run: |
         mkdir -p ./dist_old_ota
-        cp "./code/.pio/build/esp32cam/firmware.bin" "./dist_old_ota/firmware__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }}).bin"
+        cp "./code/.pio/build/esp32cam/firmware.bin" "./dist_old_ota/firmware__${{ github.ref_name }}_(${{ env.sha_short }}).bin"
 
     - name: Upload Firmware artifact (old OTA concept)
       uses: actions/upload-artifact@v3
       with:
-#        name: "firmware__${{ github.ref_name }}__(${{ steps.vars.outputs.sha_short }})__(extract_before_upload__only_needed_for_migration_from_11.3.1)"
-        name: "firmware__(extract_before_upload)__${{ github.ref_name }}__(${{ steps.vars.outputs.sha_short }})"
+        name: "firmware__(extract_before_upload)__${{ github.ref_name }}__(${{ env.sha_short }})"
         path: ./dist_old_ota/*
 
     - name: Upload Web interface artifact (old OTA concept)
       uses: actions/upload-artifact@v3
       with:
-        name: "html__${{ github.ref_name }}__(${{ steps.vars.outputs.sha_short }})"
+        name: "html__${{ github.ref_name }}__(${{ env.sha_short }})"
         path: ./sd-card/html/*
 
 
@@ -124,27 +123,15 @@ jobs:
     - name: Set Variables
       id: vars
       run: |
-        echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
+        echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
 
     - name: Prepare update.zip artifact
       run: |
         mkdir -p ./dist
         cp "./code/.pio/build/esp32cam/firmware.bin" "dist/firmware.bin"
-
-#    - name: Upload update.zip Artifact (Firmware only)
-#      uses: actions/upload-artifact@v3
-#      with:
-#        name: "update_firmware_only__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
-#        path: ./dist/*
         
     - name: Add Web UI to dist
       run: cp -r ./sd-card/html ./dist/
-
-#    - name: Upload update.zip artifact (Firmware + Web UI)
-#      uses: actions/upload-artifact@v3
-#      with:
-#        name: "update_firmware+webinterface__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
-#        path: ./dist/*
         
     - name: Add CNN to dist
       run: |
@@ -155,7 +142,7 @@ jobs:
     - name: Upload dist as update.zip artifact (Firmware + Web UI + CNN)
       uses: actions/upload-artifact@v3
       with:
-        name: "update__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
+        name: "update__${{ github.ref_name }}_(${{ env.sha_short }})"
         path: ./dist/*
 
     - name: Store generated files in cache
@@ -192,7 +179,7 @@ jobs:
     - name: Set Variables
       id: vars
       run: |
-        echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
+        echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
 
     - name: Prepare artifacts for release
       run: |
@@ -209,7 +196,7 @@ jobs:
     - 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 }})"
+        name: "initial_esp32_setup__${{ github.ref_name }}_(${{ env.sha_short }})"
         path: ./firmware
 
     - name: Store generated files in cache
@@ -262,7 +249,7 @@ jobs:
     - name: Set Variables
       id: vars
       run: |
-        echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
+        echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
 
 
     - name: Prepare artifacts for release