diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 416b2e4..3855c01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,21 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.9 + 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/ + cd dist + zip -r agile-powerwall.zip * -x "**/__pycache__/**" + - name: Release zips + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + dist/agile-powerwall.zip diff --git a/README.md b/README.md index f260566..0e370d5 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ using 1. Install Home Assistant Octopus Energy integration. 2. Install Pyscript integration. -3. Copy the contents of the `src` directory to the Home Assistant directory `/config/pyscript`. +3. Unzip the [release zip](https://github.com/pulquero/agile-powerwall/releases/latest) into the Home Assistant directory `/config`. 4. Add Pyscript app configuration: pyscript: