blrec/.github/workflows/pypi.yml

32 lines
723 B
YAML
Raw Normal View History

2022-04-09 23:01:32 +08:00
name: CI to PyPI
on:
push:
tags:
- v*.*.*
jobs:
build-and-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
2022-04-09 23:01:32 +08:00
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: 3.8
- 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
uses: pypa/gh-action-pypi-publish@v1.5.0
with:
password: ${{ secrets.PYPI_API_TOKEN }}