Skip to content

Commit

Permalink
update GH release action
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinVerges committed Jul 24, 2022
1 parent ef42271 commit 4601672
Showing 1 changed file with 62 additions and 9 deletions.
71 changes: 62 additions & 9 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,49 @@ jobs:

- name: 'Building a firmware for ESP32'
run: |
pio run
pio run -t buildfs
# produces ${{ github.workspace }}/.pio/build/esp32dev/firmware.bin
# produces ${{ github.workspace }}/.pio/build/esp32dev/littlefs.bin
pio run -e wemos_d1_mini32
pio run -e wemos_d1_mini32 -t buildfs
# produces ${{ github.workspace }}/.pio/build/wemos_d1_mini32/firmware.bin
# produces ${{ github.workspace }}/.pio/build/wemos_d1_mini32/littlefs.bin
# produces ${{ github.workspace }}/.pio/build/wemos_d1_mini32/partitions.bin
# 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:
name: firmware.bin
path: ${{ github.workspace }}/.pio/build/esp32dev/firmware.bin
path: |
${{ github.workspace }}/.pio/build/wemos_d1_mini32/firmware.bin
- name: 'Upload littlefs Artifact'
uses: actions/upload-artifact@v2
with:
name: littlefs.bin
path: ${{ github.workspace }}/.pio/build/esp32dev/littlefs.bin
path: |
${{ github.workspace }}/.pio/build/wemos_d1_mini32/littlefs.bin
- name: 'Upload partitions Artifact'
uses: actions/upload-artifact@v2
with:
name: partitions.bin
path: |
${{ github.workspace }}/.pio/build/wemos_d1_mini32/partitions.bin
- name: 'Upload partitions Artifact'
uses: actions/upload-artifact@v2
with:
name: bootloader_dio_80m.bin
path: |
~/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_80m.bin
- name: 'Upload partitions Artifact'
uses: actions/upload-artifact@v2
with:
name: boot_app0.bin
path: |
~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin
- name: 'Create Release'
id: create_release
Expand All @@ -52,7 +79,7 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
file: ${{ github.workspace }}/.pio/build/esp32dev/firmware.bin;${{ github.workspace }}/.pio/build/esp32dev/littlefs.bin
file: ${{ github.workspace }}/.pio/build/wemos_d1_mini32/firmware.bin;${{ github.workspace }}/.pio/build/wemos_d1_mini32/littlefs.bin;${{ github.workspace }}/.pio/build/wemos_d1_mini32/partitions.bin;~/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_80m.bin;~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin
body: |
Firmware release
draft: false
Expand All @@ -64,7 +91,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/.pio/build/esp32dev/firmware.bin
asset_path: ${{ github.workspace }}/.pio/build/wemos_d1_mini32/firmware.bin
asset_name: firmware.bin

- name: 'Upload littlefs Artifact to release'
Expand All @@ -73,6 +100,32 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/.pio/build/esp32dev/littlefs.bin
asset_path: ${{ github.workspace }}/.pio/build/wemos_d1_mini32/littlefs.bin
asset_name: littlefs.bin

- name: 'Upload partitions Artifact to release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/.pio/build/wemos_d1_mini32/partitions.bin
asset_name: partitions.bin

- name: 'Upload bootloader_dio_80m Artifact to release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ~/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_80m.bin
asset_name: bootloader_dio_80m.bin

- name: 'Upload boot_app0 Artifact to release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin
asset_name: boot_app0.bin

0 comments on commit 4601672

Please sign in to comment.