Build release zip. #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: push | |
jobs: | |
tests: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.11 | |
- name: Run tests | |
run: | | |
export PYTHONPATH=src/modules | |
python -m unittest discover tests | |
- name: Build zip | |
run: | | |
mkdir dist | |
mkdir dist/pyscript | |
cp -R src/* dist/pyscript/ | |
zip -r agile-powerwall.zip dist/* | |
- name: Release zips | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
agile-powerwall.zip |