Skip to content

Commit

Permalink
fix: python-semantic-release build process
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Kaechele <felix@kaechele.ca>
  • Loading branch information
kaechele committed Oct 16, 2023
1 parent 3d955f6 commit 4e80544
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 9 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Source = "https://github.com/kaechele/napoleon-efire"
path = "custom_components/napoleon_efire/manifest.json"
pattern = '"version": "(?P<version>[^\"]+)"'


[tool.hatch.envs.default]
path = ".envs/default"
python = "3.11"
Expand Down Expand Up @@ -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
"""

0 comments on commit 4e80544

Please sign in to comment.