Handle existing wheels when building Python library

This commit is contained in:
Wilson Lin 2022-06-17 18:01:13 +10:00
parent 337de1fcd9
commit fd60983516
3 changed files with 7 additions and 2 deletions

View File

@ -106,7 +106,8 @@ jobs:
# On macOS ARM64 this may emit a warning like "Couldn't find the symbol `PyInit_minify_html_core` in the native library. Python will fail to import this module." Ignore this message.
maturin build --release --strip -i "$pathToPython"
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
twine upload target/wheels/*
# For idempotency, ignore any existing built wheels that have already been successfully uploaded.
twine upload --skip-existing target/wheels/*
else
ls -al target/wheels/*
fi

View File

@ -1,5 +1,9 @@
# minify-html changelog
## 0.8.2
- Fix Python build pipeline to handle existing uploaded wheels from previous successful build attempts.
## 0.8.1
- Create wrapper index.js for Node.js library to support ESM.

View File

@ -17,7 +17,7 @@ A Rust HTML minifier meticulously optimised for speed and effectiveness, with bi
## Performance
Comparison with [html-minfier](https://github.com/kangax/html-minifier) and [minimize](https://github.com/Swaagie/minimize), run on the top web pages. [See the breakdown here.](./bench)
Comparison with [html-minifier](https://github.com/kangax/html-minifier) and [minimize](https://github.com/Swaagie/minimize), run on the top web pages. [See the breakdown here.](./bench)
<img width="400" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.8.1/core/average-speeds.png"><img width="400" alt="Chart showing compression of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.8.1/core/average-sizes.png">