Skip to content

Commit fd075f9

Browse files
Merge pull request #34 from emfcamp/ota-releases
Add release action including micropython.bin
2 parents 343c2de + ddf566a commit fd075f9

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ on:
33
pull_request:
44
workflow_dispatch:
55
push:
6-
branches: main
6+
tags:
7+
- "v*"
78
jobs:
89
Build-Firmware:
910
runs-on: ubuntu-latest
@@ -58,3 +59,19 @@ jobs:
5859
micropython/ports/esp32/build-tildamk6/bootloader/bootloader.bin
5960
micropython/ports/esp32/build-tildamk6/partition_table/partition-table.bin
6061
micropython/ports/esp32/build-tildamk6/ota_data_initial.bin
62+
- name: Create latest release for tags
63+
uses: "marvinpinto/action-automatic-releases@latest"
64+
if: github.event_name == 'push'
65+
with:
66+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
67+
automatic_release_tag: "latest"
68+
title: "Latest release build"
69+
files: |
70+
micropython/ports/esp32/build-tildamk6/micropython.bin
71+
- name: Create specific release for tags
72+
uses: "marvinpinto/action-automatic-releases@latest"
73+
if: github.event_name == 'push'
74+
with:
75+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
76+
files: |
77+
micropython/ports/esp32/build-tildamk6/micropython.bin

drivers/ota/ota.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// static const char *TAG = "ota";
99

10-
#define IMAGE_URL "https://raw.githubusercontent.com/tomsci/tidal-ota/main/micropython.bin"
10+
#define IMAGE_URL "https://github.com/emfcamp/TiDAL-Firmware/releases/download/latest/micropython.bin"
1111

1212
// openssl x509 -text -inform DER -in "DigiCert Global Root CA.cer"
1313
static const char kGithubCertificate[] =
@@ -38,6 +38,9 @@ STATIC mp_obj_t ota_update(mp_obj_t cb_obj) {
3838
esp_http_client_config_t config = {
3939
.url = IMAGE_URL,
4040
.cert_pem = kGithubCertificate,
41+
// This buffer must be big enough to contain any individual request header
42+
// We are redirected to an S3 signed URL that is 548 bytes long!!
43+
.buffer_size_tx = 768,
4144
};
4245
esp_https_ota_config_t ota_config = {
4346
.http_config = &config,

0 commit comments

Comments
 (0)