Skip to content

Commit

Permalink
Build on tag (#94)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
oliverxchen committed May 16, 2022
1 parent 3ce36fb commit a58d2bf
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.10"] # "3.8", "3.9" (re-enable when open-sourced)
python-version: ["3.7", "3.8", "3.9", "3.10"] # , "3.11.0-beta.1"]

steps:
- uses: actions/checkout@v2
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish

on:
release:
types: published

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Build and publish
run: |
poetry version $(git describe --tags --abbrev=0)
poetry build
poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# sqlean

<p align="center">
<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>
<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>
<a href="https://pypi.org/project/sqlean/"><img alt="PyPI" src="https://img.shields.io/pypi/v/sqlean"></a>
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
<a href="https://github.com/oliverxchen/sqlean/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-A31F34"></a>
Expand Down
11 changes: 11 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env python

# we use poetry for our build, but this file seems to be required
# in order to get GitHub dependencies graph to work.
# via https://patrick.wtf/posts/til-how-to-show-dependents-packages-on-github-when-using-poetry
# and https://github.com/Textualize/rich/blob/bf23d03893305d974e1ad9f44cfc45d71903a243/setup.py
import setuptools


if __name__ == "__main__":
setuptools.setup(name="sqlean")

0 comments on commit a58d2bf

Please sign in to comment.