diff --git a/.github/releasing/config.py b/.github/releasing/config.py new file mode 100644 index 0000000..4f02e3d --- /dev/null +++ b/.github/releasing/config.py @@ -0,0 +1,39 @@ +# Copyright (c) 2021 Alethea Katherine Flowers. +# Published under the standard MIT License. +# Full text available at: https://opensource.org/licenses/MIT + +import os +import os.path +import shutil +import subprocess +import sys + +import jinja2 +from __main__ import add_artifact + +message_template = jinja2.Template( + open(os.path.join(os.path.dirname(__file__), "template.jinja2"), "r").read() +) + +def prepare_artifacts(info): + os.chdir("factory") + + if os.path.exists("distribution"): + shutil.rmtree("distribution") + + subprocess.run([sys.executable, "factory_setup.py", "publish"]) + + print("Zipping up distribution...") + os.chdir("distribution") + subprocess.run(["zip", "-r", "-q", "distribution.zip", "."]) + + os.chdir("../..") + + add_artifact( + "factory/distribution/distribution.zip", + f"big-honking-button-{info['tag']}.zip", + ) + + +def prepare_description(info, artifacts): + return message_template.render(artifacts=artifacts, **info) diff --git a/.github/releasing/template.jinja2 b/.github/releasing/template.jinja2 new file mode 100644 index 0000000..4f34d07 --- /dev/null +++ b/.github/releasing/template.jinja2 @@ -0,0 +1,15 @@ +This is a bugfix & maintenance release for Big Honking Button's CircuitPython libraries. + +👉 **TL;DR download [big-honking-button-{{tag}}.zip](https://github.com/{{repo}}/releases/download/{{tag}}/big-honking-button-{{tag}}.zip) and extract it to your `CIRCUITPY` drive** 👈 + +Please follow the [firmware upgrade instructions](https://honk.wntr.dev/#updating-the-firmware) in the user's guide to upgrade your device's firmware and libraries. + +## Changes from {{last_release}} + +{%- for category, category_changes in changes.items() %} + +{{category}}: +{% for change in category_changes %} +* {{change.capitalize()}} +{%- endfor %} +{%- endfor %} diff --git a/.gitignore b/.gitignore index 6992eff..b6f3ba2 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ dist .vscode .nox .coverage +.cache +logs/ +factory/distribution diff --git a/factory/sync.exe b/factory/sync.exe deleted file mode 100644 index eb2c7f3..0000000 Binary files a/factory/sync.exe and /dev/null differ