Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
take version from tag
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhaus committed Jun 16, 2021
1 parent a5aeaf0 commit 86619f1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 18 deletions.
45 changes: 29 additions & 16 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from codecs import open
from os import path

from setuptools import setup, find_packages
Expand All @@ -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
Expand Down

0 comments on commit 86619f1

Please sign in to comment.