Skip to content

Commit af93034

Browse files
authored
Automate PyPi Releases (#109)
* github actions pypi upload on tag * forgot name for workflow * one line install * automate version * back to prod pypi
1 parent e04d1a1 commit af93034

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Python 🐍 distributions 📦 to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build-n-publish:
10+
name: Build and publish Python 🐍 distributions 📦 to PyPI
11+
runs-on: ubuntu-18.04
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Set up Python 3.10
15+
uses: actions/setup-python@v3
16+
with:
17+
python-version: '3.10'
18+
- name: Install pypa/setuptools
19+
run: >-
20+
python -m
21+
pip install wheel
22+
- name: Extract tag name
23+
id: tag
24+
run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3)
25+
- name: Update version in setup.py
26+
run: >-
27+
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py
28+
- name: Build a binary wheel
29+
run: >-
30+
python setup.py sdist bdist_wheel
31+
- name: Publish distribution 📦 to PyPI
32+
uses: pypa/gh-action-pypi-publish@master
33+
with:
34+
password: ${{ secrets.PYPI_API_TOKEN }}

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from setuptools import setup
22

33
setup(name='Boruta',
4-
version='0.1.5',
4+
version='{{VERSION_PLACEHOLDER}}',
55
description='Python Implementation of Boruta Feature Selection',
66
url='https://github.com/danielhomola/boruta_py',
77
download_url='https://github.com/danielhomola/boruta_py/tarball/0.1.5',
@@ -11,7 +11,7 @@
1111
packages=['boruta'],
1212
package_dir={'boruta': 'boruta'},
1313
package_data={'boruta/examples/*csv': ['boruta/examples/*.csv']},
14-
include_package_data = True,
14+
include_package_data=True,
1515
keywords=['feature selection', 'machine learning', 'random forest'],
1616
install_requires=['numpy>=1.10.4',
1717
'scikit-learn>=0.17.1',

0 commit comments

Comments
 (0)