Skip to content

Commit

Permalink
Strip unsupported HTML tags for PyPI readme
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Oct 19, 2022
1 parent de7c57b commit 865e1f6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry install
- name: Strip unsupported tags in README
run: |
sed -i '/<!-- pypi-strip -->/,/<!-- \/pypi-strip -->/d' README.md
- name: Build and publish
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
<br />
<p align="center">
<!-- Note that image URLs should all be absolute; this README will be used for both GitHub and PyPI. -->
<!--
Note that this README will be used for both GitHub and PyPI.
We therefore:
- Keep all image URLs absolute.
- In the GitHub action we use for publishing, strip some HTML tags that aren't supported by PyPI.
-->
<!-- pypi-strip -->
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://brentyi.github.io/tyro/_static/logo-dark.svg" />
<!-- /pypi-strip -->
<img alt="tyro logo" src="https://brentyi.github.io/tyro/_static/logo-light.svg" width="200px" />
<!-- pypi-strip -->
</picture>
<!-- /pypi-strip -->

</p>

<p align="center">
Expand Down

0 comments on commit 865e1f6

Please sign in to comment.