Tiny Docker image to build a Python package and upload it to PyPI
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
376 B

  1. FROM python:3-alpine
  2. RUN apk add --no-cache git
  3. RUN pip install --no-cache-dir build twine
  4. WORKDIR /src
  5. ENTRYPOINT git clone "$0" . \
  6. && python3 -m build --outdir /dist \
  7. && sha256sum /dist/* \
  8. && read -p 'Upload these files? [y/N] ' upload \
  9. && [ "${upload}" = y -o "${upload}" = Y ] \
  10. && TWINE_USERNAME=__token__ twine upload /dist/*