Skip to content

Commit 1b8a479

Browse files
committed
Download links now point to S3 via CloudFront
1 parent 1b33cd1 commit 1b8a479

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,3 @@ jobs:
276276
- name: Install upload deps
277277
run: |
278278
pip install uritemplate
279-
- name: Upload to Release
280-
run: "[ -z \"$ADABOT_GITHUB_ACCESS_TOKEN\" ] || python3 -u upload_release_files.py"
281-
working-directory: tools
282-
env:
283-
UPLOAD_URL: ${{ github.event.release.upload_url }}
284-
ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.BLINKA_GITHUB_ACCESS_TOKEN }}
285-
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')

tools/build_board_info.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
HEX_UF2 = ('hex', 'uf2')
2222
SPK = ('spk',)
2323

24+
# Example:
25+
# https://d111q2jukuzyg1.cloudfront.net/bin/trinket_m0/en_US/adafruit-circuitpython-trinket_m0-en_US-5.0.0-rc.0.uf2
26+
DOWNLOAD_BASE_URL = "https://d111q2jukuzyg1.cloudfront.net/bin"
27+
2428
# Default extensions
2529
extension_by_port = {
2630
"nrf": UF2,
@@ -34,6 +38,8 @@
3438
extension_by_board = {
3539
# samd
3640
"arduino_mkr1300": BIN,
41+
"arduino_mkrzero": BIN,
42+
"arduino_nano_33_iot": BIN,
3743
"arduino_zero": BIN,
3844
"feather_m0_adalogger": BIN_UF2,
3945
"feather_m0_basic": BIN_UF2,
@@ -275,7 +281,14 @@ def generate_download_info():
275281
files = []
276282
new_version["files"][language] = files
277283
for extension in board_info["extensions"]:
278-
files.append("https://github.com/adafruit/circuitpython/releases/download/{tag}/adafruit-circuitpython-{alias}-{language}-{tag}.{extension}".format(tag=new_tag, alias=alias, language=language, extension=extension))
284+
files.append(
285+
"{base_url}/{alias}/{language}/adafruit-circuitpython-{alias}-{language}-{tag}.{extension}"
286+
.format(
287+
base_url=DOWNLOAD_BASE_URL,
288+
tag=new_tag,
289+
alias=alias,
290+
language=language,
291+
extension=extension))
279292
current_info[alias]["downloads"] = alias_info["download_count"]
280293
current_info[alias]["versions"].append(new_version)
281294

0 commit comments

Comments
 (0)