Skip to content

Commit 0cfcfab

Browse files
authored
Add PyPI deploy workflow (#1110)
1 parent a5a117a commit 0cfcfab

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/publish.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# To create a release, create a tag and push it to GitHub:
2+
#git tag -a "v0.0.1-beta" -m "beta version testing"
3+
#git push --tags
4+
# https://dev.to/iamtekson/publish-package-to-pypi-and-release-new-version-using-github-actions-108k
5+
name: Publish MLxtend to PyPI
6+
7+
on:
8+
push:
9+
tags:
10+
- "v*"
11+
jobs:
12+
build-n-publish:
13+
name: Build and publish to PyPI
14+
runs-on: ubuntu-latest
15+
environment:
16+
name: pypi
17+
url: https://pypi.org/p/mlxtend
18+
permissions:
19+
id-token: write
20+
21+
steps:
22+
- name: Checkout source
23+
uses: actions/checkout@v3
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v4
27+
with:
28+
python-version: "3.x"
29+
30+
- name: Build source and wheel distributions
31+
run: |
32+
python -m pip install --upgrade build twine
33+
pip install importlib_metadata==7.2.1
34+
python -m build
35+
twine check --strict dist/*
36+
- name: Publish distribution to PyPI
37+
uses: pypa/gh-action-pypi-publish@release/v1
38+
with:
39+
user: __token__
40+
password: ${{ secrets.PYPI_API_TOKEN }}

mlxtend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
#
55
# License: BSD 3 clause
66

7-
__version__ = "0.23.2dev"
7+
__version__ = "0.23.2"

0 commit comments

Comments
 (0)