Skip to content

Commit

Permalink
Merge pull request #68 from lostfields/chore/package-version
Browse files Browse the repository at this point in the history
Use release tag as package version
  • Loading branch information
lostfields authored Jul 27, 2022
2 parents a8382d3 + b258710 commit bc60e32
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- id: setup
name: setup
run:
echo "::set-output name=version::$( echo $GITHUB_REF_NAME | sed 's/v\?\(.*\)/\1/g' )"

- uses: actions/checkout@master

- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
Expand All @@ -37,6 +45,16 @@ jobs:
--wheel
--outdir dist/
.
env:
VERSION: ${{ steps.setup.outputs.version }}

- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: artifact
path: dist
retention-days: 7

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
""" Setup for python-panasonic-comfort-cloud """

from setuptools import setup
import os

with open("README.md", "r") as fh:
long_description = fh.read()

setup(
name='pcomfortcloud',
version='0.0.22',
version=os.getenv('VERSION', default='0.0.1'),
description='Read and change status of Panasonic Comfort Cloud devices',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit bc60e32

Please sign in to comment.