From 40fbe5a61a2ef840b1d295ebe6f221f37b0bc78c Mon Sep 17 00:00:00 2001 From: Martin Verges Date: Tue, 26 Jul 2022 13:13:45 +0200 Subject: [PATCH] new GH release scripts --- .github/workflows/create-firmware.yml | 18 ++++++++++++++++++ .github/workflows/create-release.yml | 18 +++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-firmware.yml b/.github/workflows/create-firmware.yml index 096b19f..51b68aa 100644 --- a/.github/workflows/create-firmware.yml +++ b/.github/workflows/create-firmware.yml @@ -67,3 +67,21 @@ jobs: name: boot_app0.bin path: | ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin + + - name: Upload to S3 + run: | + echo "host_base = s3.womolin.de" > ~/.s3cfg + echo "host_bucket = s3.womolin.de" >> ~/.s3cfg + echo "bucket_location = de-fra" >> ~/.s3cfg + echo "use_https = True" >> ~/.s3cfg + echo "access_key = ${{ secrets.S3_ACCESS_KEY }}" >> ~/.s3cfg + echo "secret_key = ${{ secrets.S3_SECRET_KEY }}" >> ~/.s3cfg + echo "signature_v2 = False" >> ~/.s3cfg + sudo apt -y update + sudo apt -y install s3cmd + s3cmd put ${{ github.workspace }}/.pio/build/wemos_d1_mini32/firmware.bin s3://webinstaller/gaslevel-latest/ + s3cmd put ${{ github.workspace }}/.pio/build/wemos_d1_mini32/littlefs.bin s3://webinstaller/gaslevel-latest/ + s3cmd put ${{ github.workspace }}/.pio/build/wemos_d1_mini32/partitions.bin s3://webinstaller/gaslevel-latest/ + s3cmd put ~/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_80m.bin s3://webinstaller/gaslevel-latest/ + s3cmd put ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin s3://webinstaller/gaslevel-latest/ + diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 8518a5d..4622480 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -35,7 +35,6 @@ jobs: # produces ~/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_80m.bin # produces ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin - - name: 'Upload firmware Artifact' uses: actions/upload-artifact@v2 with: @@ -71,6 +70,23 @@ jobs: path: | ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin + - name: Upload to S3 + run: | + echo "host_base = s3.womolin.de" > ~/.s3cfg + echo "host_bucket = s3.womolin.de" >> ~/.s3cfg + echo "bucket_location = de-fra" >> ~/.s3cfg + echo "use_https = True" >> ~/.s3cfg + echo "access_key = ${{ secrets.S3_ACCESS_KEY }}" >> ~/.s3cfg + echo "secret_key = ${{ secrets.S3_SECRET_KEY }}" >> ~/.s3cfg + echo "signature_v2 = False" >> ~/.s3cfg + sudo apt -y update + sudo apt -y install s3cmd + s3cmd put ${{ github.workspace }}/.pio/build/wemos_d1_mini32/firmware.bin s3://webinstaller/gaslevel-release/ + s3cmd put ${{ github.workspace }}/.pio/build/wemos_d1_mini32/littlefs.bin s3://webinstaller/gaslevel-release/ + s3cmd put ${{ github.workspace }}/.pio/build/wemos_d1_mini32/partitions.bin s3://webinstaller/gaslevel-release/ + s3cmd put ~/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_80m.bin s3://webinstaller/gaslevel-release/ + s3cmd put ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin s3://webinstaller/gaslevel-release/ + - name: 'Create Release' id: create_release uses: actions/create-release@v1