diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9d1c0cd..418d155 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,9 +16,6 @@ jobs: with: fetch-depth: 0 - - name: Install Hatch - run: pip install hatch - # Run semantic release: # - Update CHANGELOG.md # - Update version in code diff --git a/pyproject.toml b/pyproject.toml index 6e8c8fc..b066e5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,6 @@ Source = "https://github.com/kaechele/napoleon-efire" path = "custom_components/napoleon_efire/manifest.json" pattern = '"version": "(?P[^\"]+)"' - [tool.hatch.envs.default] path = ".envs/default" python = "3.11" @@ -195,7 +194,12 @@ max-complexity = 25 [tool.semantic_release] logging_use_named_masks = true -assets = [ - "custom_components/napoleon_efire/manifest.json" -] -build_command = "hatch version $(semantic-release version --print) && pushd custom_components/napoleon_efire/ && mkdir ../../dist && zip ../../dist/napoleon_efire.zip -r ./; popd" +build_command = """ + hatch --version || pip install hatch + hatch version $(semantic-release version --print) + git add custom_components/napoleon_efire/manifest.json + pushd custom_components/napoleon_efire/ + mkdir -p ../../dist + zip ../../dist/napoleon_efire.zip -r ./ + popd +"""