Skip to content

Commit a58d2bf

Browse files
authored
Build on tag (#94)
* build with poetry and publish to pypi with API token * add python 3.8 and 3.9 to testing matrix * 3.11.0-beta.1 failed with an error on os.linesep. Will resolve later
1 parent 3ce36fb commit a58d2bf

File tree

4 files changed

+39
-2
lines changed

4 files changed

+39
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: ["3.7", "3.10"] # "3.8", "3.9" (re-enable when open-sourced)
11+
python-version: ["3.7", "3.8", "3.9", "3.10"] # , "3.11.0-beta.1"]
1212

1313
steps:
1414
- uses: actions/checkout@v2

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: published
6+
7+
jobs:
8+
deploy:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.10'
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install poetry
22+
- name: Build and publish
23+
run: |
24+
poetry version $(git describe --tags --abbrev=0)
25+
poetry build
26+
poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# sqlean
22

33
<p align="center">
4-
<a href="https://www.python.org/"><img alt="Python versions: 3.7, 3.10" src="https://img.shields.io/badge/python-3.7%20%7C%203.10-blue"></a>
4+
<a href="https://www.python.org/"><img alt="Python versions: 3.7, 3.8, 3.9, 3.10" src="https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue"></a>
55
<a href="https://pypi.org/project/sqlean/"><img alt="PyPI" src="https://img.shields.io/pypi/v/sqlean"></a>
66
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
77
<a href="https://github.com/oliverxchen/sqlean/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-A31F34"></a>

setup.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env python
2+
3+
# we use poetry for our build, but this file seems to be required
4+
# in order to get GitHub dependencies graph to work.
5+
# via https://patrick.wtf/posts/til-how-to-show-dependents-packages-on-github-when-using-poetry
6+
# and https://github.com/Textualize/rich/blob/bf23d03893305d974e1ad9f44cfc45d71903a243/setup.py
7+
import setuptools
8+
9+
10+
if __name__ == "__main__":
11+
setuptools.setup(name="sqlean")

0 commit comments

Comments
 (0)