Skip to content

publish

publish #31

Workflow file for this run

name: publish
on:
release:
types:
- published
permissions:
contents: read
jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Strip GitHub badges
run: |
awk '
BEGIN { in_block = 0 }
/\|/ && in_block == 0 { in_block = 1; print; next } # Print the first | and skip
/\|/ && in_block == 1 { in_block = 0; next } # Skip the second |
in_block == 0 { print } # Print lines outside the block
' README.rst > tmp && mv tmp README.rst
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade build
pip install --upgrade .
- name: Build wheel and sdist
run: python -m build --sdist --wheel --outdir dist/
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}