@@ -50,33 +50,56 @@ jobs:
50
50
path : dist
51
51
52
52
combine-artifacts :
53
- name : Combine artifacts
54
- needs : build-libs
55
- runs-on : ubuntu-latest
56
- steps :
57
- - name : Download artifacts
58
- uses : actions/download-artifact@v4
59
- with :
60
- path : dist
61
- pattern : artifacts-*
62
- merge-multiple : true
63
-
64
- - shell : bash
65
- run : |
66
- mkdir -p out
67
- find dist -name 'arduino-esp32-libs-esp*.tar.gz' -exec tar zxvf {} -C out \;
68
- cd out/tools/esp32-arduino-libs && tar zcf ../../../dist/esp32-arduino-libs.tar.gz * && cd ../../..
69
- cp out/package_esp32_index.template.json dist/package_esp32_index.template.json
70
-
71
- - name : Upload full esp32-arduino-libs archive
72
- uses : actions/upload-artifact@v4
73
- with :
74
- name : esp32-arduino-libs
75
- path : dist/esp32-arduino-libs.tar.gz
76
-
77
- - name : Upload package_esp32_index.template.json
78
- uses : actions/upload-artifact@v4
79
- with :
80
- name : package-esp32-index-json
81
- path : dist/package_esp32_index.template.json
82
-
53
+ name : Combine artifacts
54
+ needs : build-libs
55
+ runs-on : ubuntu-latest
56
+ steps :
57
+ - name : Download artifacts
58
+ uses : actions/download-artifact@v4
59
+ with :
60
+ path : dist
61
+ pattern : artifacts-*
62
+ merge-multiple : true
63
+
64
+ - shell : bash
65
+ run : |
66
+ mkdir -p out
67
+ # 1. Rozpakowujemy wszystkie pliki `arduino-esp32-libs-esp*.tar.gz` do `out`
68
+ find dist -name 'arduino-esp32-libs-esp*.tar.gz' -exec tar zxvf {} -C out \;
69
+
70
+ # 2. Tworzymy docelowe archiwum esp32-arduino-libs.tar.gz w `dist`
71
+ cd out/tools/esp32-arduino-libs
72
+ tar zcf ../../../dist/esp32-arduino-libs.tar.gz *
73
+ cd ../../..
74
+
75
+ # 3. Kopiujemy package_esp32_index.template.json do dist
76
+ cp out/package_esp32_index.template.json dist/package_esp32_index.template.json
77
+
78
+ # --- DODAJEMY NOWY KROK, który rozpakowuje tar.gz i tworzy ZIP z gołą zawartością ---
79
+ - shell : bash
80
+ name : Create unpacked ZIP
81
+ run : |
82
+ # Rozpakuj do katalogu tymczasowego
83
+ mkdir -p dist/tmp-libs
84
+ tar zxf dist/esp32-arduino-libs.tar.gz -C dist/tmp-libs
85
+
86
+ # Stwórz ZIP ze wszystkimi rozpakowanymi plikami
87
+ cd dist/tmp-libs
88
+ zip -r ../esp32-arduino-libs-unpacked.zip .
89
+ cd ../..
90
+
91
+ - name : Upload full esp32-arduino-libs archive
92
+ uses : actions/upload-artifact@v4
93
+ with :
94
+ # Oryginalny tar.gz + nowo-utworzony ZIP
95
+ name : esp32-arduino-libs
96
+ path : |
97
+ dist/esp32-arduino-libs.tar.gz
98
+ dist/esp32-arduino-libs-unpacked.zip
99
+
100
+ - name : Upload package_esp32_index.template.json
101
+ uses : actions/upload-artifact@v4
102
+ with :
103
+ name : package-esp32-index-json
104
+ path : dist/package_esp32_index.template.json
105
+
0 commit comments