add res/pyglossary-256x256.png, use in README.md #92
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pypi-publish | |
on: | |
push: | |
branches: ["master"] | |
jobs: | |
pypi-publish: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
environment: | |
name: pypi | |
url: https://pypi.org/p/pyglossary | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create release | |
id: create-release | |
run: | | |
VERSION=$(./scripts/version-core) | |
if pip index versions pyglossary --pre --ignore-requires-python | grep "$VERSION," ; then | |
echo "Package version $VERSION already exists on pypi" | |
echo "skipnext=true" >> $GITHUB_OUTPUT | |
exit 0 | |
fi | |
sudo rm -rf dist/* build/* || true | |
python3 setup.py sdist bdist_wheel | |
- name: Publish package distributions to PyPI | |
if: ( steps.create-release.outputs.skipnext != 'true' ) | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
skip-existing: true | |
verbose: true | |
password: ${{ secrets.PYPI_API_TOKEN }} |