Skip to content

Merge pull request #244 from timgates42/bugfix_typos #11

Merge pull request #244 from timgates42/bugfix_typos

Merge pull request #244 from timgates42/bugfix_typos #11

Workflow file for this run

name: Publish Python 🐍 distributions 📦 to PyPI
on: push
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Setup pandoc for changelog conversion
run: sudo apt update && sudo apt install -y pandoc
- name: Write pypi's readme
run: |
cat README.rst > to-pypi.rst
echo "" >> to-pypi.rst
pandoc -s --to rst -o /dev/stdout CHANGELOG.md | tee -a to-pypi.rst
mv to-pypi.rst README.rst
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}