Skip to content

v1.6.2

v1.6.2 #48

Workflow file for this run

name: Release to PyPI
on:
release:
types:
- published
jobs:
build_packages:
name: build wheel & source distribtions
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.10' ]
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: load cached Python installation
id: cache
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: build-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'setup.*') }}
- name: install build package
run: pip install build
- name: build package
run: python -m build
- name: save builds
uses: actions/upload-artifact@v4
with:
name: build
path: ./dist
upload_pypi:
if: github.event_name == 'release'
name: publish to PyPI
needs: [ build_packages ]
runs-on: ubuntu-latest
steps:
- name: retrieve wheel(s) and source
uses: actions/download-artifact@v4
with:
name: build
path: dist
- name: upload wheel(s) and source
uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}