File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Python 🐍 distributions 📦 to PyPI
2
+ on :
3
+ release :
4
+ types : [created]
5
+ jobs :
6
+ publish :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - uses : actions/checkout@v2
10
+ - name : Get tagged version
11
+ id : vars
12
+ run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
13
+ - name : Replace tag template in `setup.py`
14
+ env :
15
+ RELEASE_VERSION : ${{ steps.vars.outputs.tag }}
16
+ run : |
17
+ echo replacing TEMPLATE_VERSION in setup.py with $RELEASE_VERSION...
18
+ sed -i "s|TEMPLATE_VERSION|$RELEASE_VERSION|" setup.py
19
+ - name : Set up Python
20
+ uses : actions/setup-python@v2
21
+ with :
22
+ python-version : " 3.x"
23
+ - name : Install dependencies
24
+ run : |
25
+ python -m pip install --upgrade pip
26
+ pip install setuptools wheel twine
27
+ - name : Build and publish
28
+ env :
29
+ TWINE_USERNAME : __token__
30
+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
31
+ run : |
32
+ python setup.py sdist bdist_wheel
33
+ python -m twine upload dist/*
Original file line number Diff line number Diff line change 4
4
5
5
setup (
6
6
name = 'pylutron' ,
7
- version = '0.2.8 ' ,
7
+ version = 'TEMPLATE_VERSION ' ,
8
8
license = 'MIT' ,
9
9
description = 'Python library for Lutron RadioRA 2' ,
10
10
author = 'Dima Zavin' ,
You can’t perform that action at this time.
0 commit comments