diff --git a/.github/workflows/building.yaml b/.github/workflows/building.yaml index cd2e177..c7c5489 100644 --- a/.github/workflows/building.yaml +++ b/.github/workflows/building.yaml @@ -34,7 +34,7 @@ jobs: - name: Detect build version run: echo "PKG_VERSION=$(hatch version)" >> "$GITHUB_ENV" - - name: Build the package + - name: Build test package run: hatch -v build -t sdist - name: Log package content @@ -46,9 +46,12 @@ jobs: - name: Test if the package is built correctly run: python -c "import custom_components.econnect_alarm" + - name: Build the release package + run: hatch -v build -t zipped-directory + - name: Upload release archive uses: actions/upload-artifact@v3 with: - name: econnect-alarm-${{ env.PKG_VERSION }}.tar.gz - path: dist/econnect_alarm-${{ env.PKG_VERSION }}.tar.gz + name: econnect-alarm-${{ env.PKG_VERSION }}.zip + path: dist/econnect_alarm-${{ env.PKG_VERSION }}.zip if-no-files-found: error diff --git a/pyproject.toml b/pyproject.toml index 16b3da6..4acda66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,8 @@ [build-system] -requires = ["hatchling"] +requires = [ + "hatchling", + "hatch-zipped-directory", +] build-backend = "hatchling.build" [project] @@ -76,3 +79,6 @@ asyncio_mode = "auto" [tool.hatch.build.targets.sdist] only-include = ["custom_components/econnect_alarm"] + +[tool.hatch.build.targets.zipped-directory] +only-include = ["custom_components/econnect_alarm"]