Skip to content

Commit 6bd32b8

Browse files
authored
Use CI for upload binaries (#8)
* ci: simplified test * ci: transport artifacts from the container
1 parent d918140 commit 6bd32b8

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v3
1717

18+
- name: Extract Tag Name
19+
id: extract_tag_name
20+
run: echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
21+
1822
- name: Create Draft Release
1923
id: create_release
2024
run: |
21-
gh release create ${{ github.ref }} --title "Release ${{ github.ref }}" --notes "Release notes for ${{ github.ref }}" --draft
25+
gh release create ${{ steps.extract_tag_name.outputs.tag_name }} --title "Release ${{ steps.extract_tag_name.outputs.tag_name }}" --notes "Release notes for ${{ steps.extract_tag_name.outputs.tag_name }}" --draft
2226
env:
2327
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2428

@@ -27,10 +31,10 @@ jobs:
2731
strategy:
2832
matrix:
2933
board:
30-
- { name: "ESP32-S3-BOX-3", sdkconfig: "sdkconfig.defaults.esp-box-3" }
31-
- { name: "ESP32-S3-BOX", sdkconfig: "sdkconfig.defaults.esp-box" }
32-
#- { name: "ESP32-P4", sdkconfig: "sdkconfig.defaults.esp32_p4_function_ev_board" }
33-
- { name: "M5Stack-CoreS3", sdkconfig: "sdkconfig.defaults.m5stack_core_s3" }
34+
- { name: "esp32-s3-box-3", sdkconfig: "sdkconfig.defaults.esp-box-3" }
35+
- { name: "esp32-s3-box", sdkconfig: "sdkconfig.defaults.esp-box" }
36+
#- { name: "esp32-p4", sdkconfig: "sdkconfig.defaults.esp32_p4_function_ev_board" }
37+
- { name: "m5stack-cores3", sdkconfig: "sdkconfig.defaults.m5stack_core_s3" }
3438
runs-on: ubuntu-22.04
3539
container: espressif/idf:release-v5.3
3640

@@ -50,14 +54,16 @@ jobs:
5054
5155
- name: Merge binaries into a single image
5256
run: |
53-
. /opt/esp/idf/export.sh
54-
cmake -Daction=merge_binaries -P Bootloader.cmake
57+
. /opt/esp/idf/export.sh
58+
cmake -Daction=merge_binaries -P Bootloader.cmake
59+
mv build/combined.bin build/graphical_bootloader_${{ matrix.board.name }}.bin
60+
5561
5662
- name: Upload artifact
5763
uses: actions/upload-artifact@v4
5864
with:
59-
name: graphical_bootloader_${{ matrix.board.name }}
60-
path: build/combined.bin
65+
name: graphical_bootloader_${{ matrix.board.name }}.bin
66+
path: build/graphical_bootloader_${{ matrix.board.name }}.bin
6167

6268
upload-release-assets:
6369
needs: build-and-upload
@@ -70,14 +76,17 @@ jobs:
7076
uses: actions/download-artifact@v4
7177
with:
7278
path: ./artifacts
73-
merge-multiple: false
79+
merge-multiple: true
80+
81+
- name: Extract Tag Name
82+
id: extract_tag_name
83+
run: echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
7484

7585
- name: Rename and Upload Release Assets
7686
run: |
77-
for file in ./artifacts/*/combined.bin; do
78-
base_name=$(basename $(dirname "$file"))
79-
mv "$file" "./artifacts/graphical_bootloader_${base_name}.bin"
80-
gh release upload ${{ needs.create-release.outputs.upload_url }} "./artifacts/graphical_bootloader_${base_name}.bin" --clobber
87+
ls -l ./artifacts
88+
for file in ./artifacts/*.bin; do
89+
gh release upload ${{ steps.extract_tag_name.outputs.tag_name }} "${file}" --clobber
8190
done
8291
env:
8392
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
[Run on-line in Wokwi Simulator](https://wokwi.com/experimental/viewer?diagram=https://github.com/georgik/esp32-graphical-bootloader/blob/main/diagram.json&firmware=https://github.com/georgik/esp32-graphical-bootloader/releases/download/v0.3/graphical-bootloader-esp32-box-3-uf2.bin)
88

9-
[![Try it with ESP Launchpad](https://espressif.github.io/esp-launchpad/assets/try_with_launchpad.png)](https://espressif.github.io/esp-launchpad/?flashConfigURL=https://raw.githubusercontent.com/georgik/esp32-graphical-bootloader/main/esp-launchpad.toml)
10-
11-
129
## Selected board
1310

1411
The project is by default configured for ESP32-S3-BOX-3. In case of different board please run one of following exports and then CMake command:

0 commit comments

Comments
 (0)