Skip to content

Version 1.6.0

Version 1.6.0 #47

Workflow file for this run

name: PyPI release
on:
release:
types: [released]
jobs:
build_and_upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip build setuptools twine
- name: Build and upload esp-idf-monitor ${{ github.event.release.tag_name }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PROJECT_TOKEN }}
run: |
PUBLISHED_VERSION=$(curl https://pypi.org/pypi/esp-idf-monitor/json 2>/dev/null | jq -r '.info.version')
CURRENT_VERSION=$(python -c "from esp_idf_monitor import __version__; print(__version__)")
if [ "$PUBLISHED_VERSION" == "$CURRENT_VERSION" ]; then
echo "Version ${PUBLISHED_VERSION} already published, skipping..."
exit 0
else
echo "Packaging and publishing new esp-idf-monitor version: ${CURRENT_VERSION}"
python -m build
twine check dist/* && twine upload dist/*
fi