diff --git a/.github/workflows/Tasmota_build_devel.yml b/.github/workflows/Tasmota_build_devel.yml index aada97400..1feaac77e 100644 --- a/.github/workflows/Tasmota_build_devel.yml +++ b/.github/workflows/Tasmota_build_devel.yml @@ -25,6 +25,11 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.x' + - name: Get and store commit SHA + run: | + COMMIT_SHA_LONG=$(git rev-parse --short HEAD || echo "") + COMMIT_SHA_SHORT=${COMMIT_SHA_LONG::7} + echo "COMMIT_SHA=$COMMIT_SHA_SHORT" >> $GITHUB_ENV - name: Install clang compiler run: | sudo apt-get install -f clang @@ -113,6 +118,9 @@ jobs: pip install -U platformio cp ./platformio_tasmota_core3_env_sample.ini ./platformio_tasmota_core3_env.ini cp ./platformio_override_sample.ini ./platformio_override.ini + - name: Add SHA to footer + run: | + sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT = \"\"${{ env.COMMIT_SHA }}\"-\"/g" ./tasmota/include/tasmota_version.h - name: Run PlatformIO run: platformio run -e ${{ matrix.variant }} - name: Upload safeboot firmware artifacts @@ -151,6 +159,9 @@ jobs: run: | pip install wheel pip install -U platformio + - name: Add SHA to footer + run: | + sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT = \"\"${{ env.COMMIT_SHA }}\"-\"/g" ./tasmota/include/tasmota_version.h - name: Run PlatformIO run: platformio run -e ${{ matrix.variant }} - name: Upload firmware artifacts @@ -203,9 +214,9 @@ jobs: with: name: firmware_safeboot path: ./firmware - - name: Display downloaded files + - name: Add SHA to footer run: | - ls -R ./firmware/ + sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT = \"\"${{ env.COMMIT_SHA }}\"-\"/g" ./tasmota/include/tasmota_version.h - name: Run PlatformIO run: platformio run -e ${{ matrix.variant }} - name: Upload firmware artifacts @@ -242,9 +253,9 @@ jobs: with: name: firmware_safeboot path: ./firmware - - name: Display downloaded files + - name: Add SHA to footer run: | - ls -R ./firmware/ + sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT = \"\"${{ env.COMMIT_SHA }}\"-\"/g" ./tasmota/include/tasmota_version.h - name: Run PlatformIO run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }} - name: Upload language firmware artifacts