Skip to content

setup: Update version to v0.1.5 #2

setup: Update version to v0.1.5

setup: Update version to v0.1.5 #2

Workflow file for this run

name: Deploy to PyPI
on:
push:
tags:
- 'v*.*.*' # This will trigger the workflow only when a tag that matches the pattern is pushed
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Check Tag and setup.py Version Match
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/v}
SETUP_VERSION=$(grep -oE "version='([^']+)" setup.py | grep -oE '[^=]+$')
if [[ "$TAG_VERSION" != "$SETUP_VERSION" ]]; then
echo "Tag version $TAG_VERSION does not match setup.py version $SETUP_VERSION."
exit 1
fi
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install jinja2 setuptools wheel
generate/generate-python.py --output-dir=brping
- name: Build package
run: |
python setup.py sdist bdist_wheel
- name: Build and Publish
uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
distributions: "sdist bdist_wheel"