Skip to content

v0.11.5: Removed a deprecated import from pydantic #33

v0.11.5: Removed a deprecated import from pydantic

v0.11.5: Removed a deprecated import from pydantic #33

Workflow file for this run

name: Release
on:
release:
types: [ released ]
env:
MODULE_NAME: bev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- id: get_version
name: Get the release version
uses: Simply007/get-version-action@v2
- name: Check the version and build the package
run: |
RELEASE=${{ steps.get_version.outputs.version-without-v }}
VERSION=$(python -c "from pathlib import Path; import runpy; folder, = {d.parent for d in Path().resolve().glob('*/__init__.py') if d.parent.is_dir() and (d.parent / '__version__.py').exists()}; print(runpy.run_path(folder / '__version__.py')['__version__'])")
MATCH=$(pip index versions $MODULE_NAME | grep "Available versions:" | grep $VERSION) || echo
echo $MATCH
if [ "$GITHUB_BASE_REF" = "master" ] && [ "$MATCH" != "" ]; then echo "Version $VERSION already present" && exit 1; fi
if [ "$VERSION" != "$RELEASE" ]; then echo "$VERSION vs $RELEASE" && exit 1; fi
python setup.py sdist
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}