diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 3bfabfc..4230e41 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -18,19 +18,32 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + - name: 📥 Checkout the repository + uses: actions/checkout@v2 + + - name: 🔢 Get release version + id: version + uses: home-assistant/actions/helpers/version@master + + - name: 🖊️ Set version number + run: | + sed -i '/version=/c\ version="${{ steps.version.outputs.version }}",' "${{ github.workspace }}/setup.py" + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: 📦 Build package + run: python -m build + + - name: 📤 Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/setup.py b/setup.py index 5da9dd6..85e50b3 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ -from codecs import open from os import path from setuptools import setup, find_packages @@ -10,7 +9,7 @@ setup( name="deebotozmo", - version="1.8.0", + version="0.0.0", description="a library for controlling certain robot vacuums", long_description=long_description, # Author details