Skip to content

Commit

Permalink
Add assets and packing to build action
Browse files Browse the repository at this point in the history
  • Loading branch information
unic8s committed Nov 26, 2024
1 parent a5fc02c commit 0e57215
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 32 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ jobs:
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.github_token }}

- name: Pack assets
run: python utils/pack-assets.py

- name: Upload archive to release
- name: Upload binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.github_token }}
Expand All @@ -48,3 +51,14 @@ jobs:
overwrite: true
draft: true
body: ${{ steps.tag_version.outputs.changelog }}

- name: Upload assets to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.github_token }}
file: ./assets.zip
asset_name: assets.zip
tag: ${{ steps.tag_version.outputs.new_tag }}
overwrite: true
draft: true
body: ${{ steps.tag_version.outputs.changelog }}
12 changes: 2 additions & 10 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ lib_dir = libraries
src_dir = src

[libraries]
lvgl = lvgl/lvgl @ ^8.3.6
sd = arduino-libraries/SD@^1.3.0
tinyusb = espressif/esp_tinyusb@^1.4.5

[com]
platform = espressif32
Expand All @@ -32,13 +31,6 @@ board_build.filesystem = littlefs
board_build.partitions = partitions/default_16MB.csv
build_flags =
-D LOG_LOCAL_LEVEL=ESP_LOG_VERBOSE
lib_deps = ${libraries.sd}

[com-lvgl]
build_flags =
lib_deps =
${libraries.lvgl}


[env:LVGL-320-480]
platform = ${com.platform}
Expand All @@ -52,7 +44,7 @@ board_build.partitions = ${com.board_build.partitions}
build_flags =
${com.build_flags}
-D LV_CONF_PATH='${PROJECT_DIR}/src/lv_conf.h'
extra_scripts = merge-bin.py
extra_scripts = utils/merge-bin.py


monitor_speed = 115200
Expand Down
1 change: 1 addition & 0 deletions sdcard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Extract this to the SD card root folder
2 changes: 1 addition & 1 deletion squareline/SquareLine_Project.sll
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"uiExportFolderPath": "C:\\Users\\erikl\\Documents\\Arduino\\sketches\\hd2_macropad",
"projectExportFolderPath": "C:/Users/erikl/Documents/Arduino/sketches/hd2_macropad",
"custom_variable_prefix": "uic",
"backup_cnt": 1159,
"backup_cnt": 1175,
"autosave_cnt": 0,
"lvgl_version": "8.3.11",
"callfuncsexport": "C_FILE",
Expand Down
44 changes: 24 additions & 20 deletions squareline/SquareLine_Project.spj
Original file line number Diff line number Diff line change
Expand Up @@ -9641,7 +9641,8 @@
"InheritedType": 11
}
],
"saved_objtypeKey": "TABPAGE"
"saved_objtypeKey": "TABPAGE",
"tree_closed": true
},
{
"guid": "GUID40109768-171702S249023306",
Expand Down Expand Up @@ -13949,7 +13950,8 @@
"InheritedType": 11
}
],
"saved_objtypeKey": "TABPAGE"
"saved_objtypeKey": "TABPAGE",
"tree_closed": true
},
{
"guid": "GUID849156-171749S7253306",
Expand Down Expand Up @@ -18257,7 +18259,8 @@
"InheritedType": 11
}
],
"saved_objtypeKey": "TABPAGE"
"saved_objtypeKey": "TABPAGE",
"tree_closed": true
},
{
"guid": "GUID36846584-171765S4643306",
Expand Down Expand Up @@ -20945,7 +20948,8 @@
"InheritedType": 11
}
],
"saved_objtypeKey": "TABPAGE"
"saved_objtypeKey": "TABPAGE",
"tree_closed": true
}
],
"dont_export": false,
Expand All @@ -20954,7 +20958,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "TabView1",
"strval": "TabStratagems",
"InheritedType": 10
},
{
Expand Down Expand Up @@ -21079,7 +21083,7 @@
0,
0,
0,
255
0
],
"InheritedType": 7
}
Expand Down Expand Up @@ -21381,7 +21385,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "LabelAmount",
"strval": "LblCurAmount",
"childs": [
{
"nid": 15,
Expand Down Expand Up @@ -21537,7 +21541,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "Label2",
"strval": "LblMaxAmount",
"InheritedType": 10
},
{
Expand Down Expand Up @@ -21689,7 +21693,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "Label6",
"strval": "LblReset",
"InheritedType": 10
},
{
Expand Down Expand Up @@ -21834,7 +21838,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "Button69",
"strval": "BtnReset",
"InheritedType": 10
},
{
Expand Down Expand Up @@ -22044,7 +22048,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "Container8",
"strval": "SetupFooter",
"InheritedType": 10
},
{
Expand Down Expand Up @@ -22349,7 +22353,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "Button68",
"strval": "BtnReinforce",
"InheritedType": 10
},
{
Expand Down Expand Up @@ -22589,7 +22593,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "Button59",
"strval": "BtnResupply",
"InheritedType": 10
},
{
Expand Down Expand Up @@ -22829,7 +22833,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "Button60",
"strval": "BtnSOS",
"InheritedType": 10
},
{
Expand Down Expand Up @@ -23069,7 +23073,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "Button61",
"strval": "BtnRearm",
"InheritedType": 10
},
{
Expand Down Expand Up @@ -24243,7 +24247,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "Container6",
"strval": "BoxStratagems",
"InheritedType": 10
},
{
Expand Down Expand Up @@ -24396,7 +24400,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "Label3",
"strval": "LblBack",
"InheritedType": 10
},
{
Expand Down Expand Up @@ -24541,7 +24545,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "Button39",
"strval": "BtnBack",
"InheritedType": 10
},
{
Expand Down Expand Up @@ -24762,7 +24766,7 @@
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "Container5",
"strval": "GameFooter",
"InheritedType": 10
},
{
Expand Down Expand Up @@ -25227,7 +25231,7 @@
"uiExportFolderPath": "C:\\Users\\erikl\\Documents\\Arduino\\sketches\\hd2_macropad",
"projectExportFolderPath": "C:/Users/erikl/Documents/Arduino/sketches/hd2_macropad",
"custom_variable_prefix": "uic",
"backup_cnt": 1158,
"backup_cnt": 1174,
"autosave_cnt": 0,
"lvgl_version": "8.3.11",
"callfuncsexport": "C_FILE",
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions utils/pack-assets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import shutil
import os.path

sourceDir = 'sdcard'
targetFile = 'assets'

if os.path.exists(targetFile):
os.unlink(targetFile)

archived = shutil.make_archive(targetFile, 'zip', sourceDir)

0 comments on commit 0e57215

Please sign in to comment.