Skip to content

Commit 01310ed

Browse files
authored
Merge pull request django-haystack#1775 from dulmandakh/publish
Publish to PyPI on Github release
2 parents dae84c8 + 32e76c4 commit 01310ed

File tree

3 files changed

+33
-10
lines changed

3 files changed

+33
-10
lines changed

.github/workflows/publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: 3.8
17+
- name: Install dependencies
18+
run: python -m pip install --upgrade pip setuptools twine wheel
19+
- name: Build package
20+
run: python setup.py sdist bdist_wheel
21+
- name: Publish to PyPI
22+
run: twine upload --non-interactive dist/*

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]
3+
14
[tool.black]
25
line_length=88
36

47
[tool.isort]
58
known_first_party = ["haystack", "test_haystack"]
69
profile = "black"
7-
multi_line_output = 3
10+
multi_line_output = 3
11+
12+
[tool.setuptools_scm]
13+
fallback_version = "0.0.dev0"
14+
write_to = "haystack/version.py"

setup.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
#!/usr/bin/env python
22
from setuptools import setup
33

4-
try:
5-
from setuptools import setup
6-
except ImportError:
7-
from ez_setup import use_setuptools
8-
9-
use_setuptools()
10-
from setuptools import setup
11-
124
install_requires = ["Django>=2.2"]
135

146
tests_require = [
@@ -45,7 +37,8 @@
4537
"Environment :: Web Environment",
4638
"Framework :: Django",
4739
"Framework :: Django :: 2.2",
48-
"Framework :: Django :: 3.0",
40+
"Framework :: Django :: 3.1",
41+
"Framework :: Django :: 3.2",
4942
"Intended Audience :: Developers",
5043
"License :: OSI Approved :: BSD License",
5144
"Operating System :: OS Independent",
@@ -55,6 +48,7 @@
5548
"Programming Language :: Python :: 3.6",
5649
"Programming Language :: Python :: 3.7",
5750
"Programming Language :: Python :: 3.8",
51+
"Programming Language :: Python :: 3.9",
5852
"Topic :: Utilities",
5953
],
6054
zip_safe=False,

0 commit comments

Comments
 (0)