Skip to content

header auto replace #33

header auto replace

header auto replace #33

Workflow file for this run

name: Publish distributions to PyPI
on: push
jobs:
build-n-publish:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install build
run: python3 -m pip install -U build
- name: Replace Raw
run: python3 -c "lines = open('README.rst', 'r').readlines(); header = open('PYPIHEADER.rst', 'r').readlines(); open('README.rst', 'w').writelines(header + ['\n'] + lines[14:])"
- name: Build
run: python3 -m build --outdir dist/
- name: Publish
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}