adafruit / cookiecutter-adafruit-circuitpython

Cookiecutter template for Adafruit's CircuitPython libraries.
MIT License
22 stars 37 forks source link

archive built assets as artifacts in build.yml workflow #93

Closed 2bndy5 closed 3 years ago

2bndy5 commented 3 years ago

This adds a simple step to the build.yml workflow that allows downloading the built assets for a specific job run (if successful). Addresses #92 and should be useful for inspecting/testing assets before release, especially if mpy files are needed when developing and your local machine isn't equipped to build the assets.

According to the github action docs:

By default, GitHub stores build logs and artifacts for 90 days, and this retention period can be customized. For more information, see "Usage limits, billing, and administration". The retention period for a pull request restarts each time someone pushes a new commit to the pull request.

See also the README in the actions/upload-artifacts about adjusting retention period (defaults to max 90 days).

2bndy5 commented 3 years ago

looks like the pre-commit workflow needs updating. The ::set-env call has been deprecated. I'd raise another issue, but I'm not familiar with the current usage of set-env to implement the recommended solution (see deprecation notice). I'm not really sure what the pre-commit action is doing with the supposed "PY" env var either.

tannewt commented 3 years ago

@jepler Do you have set-env context? I think I remember you doing something with it.

jepler commented 3 years ago
-        echo "::set-env name=CP_VERSION::$(git describe --dirty --tags)"
+        echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)

Here's what we did in CircuitPython.