Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy actions #1

Merged
merged 6 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and publish to PyPi

on:
release:
types: [published]

jobs:
# Push a new release to PyPI
deploy_to_pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
if: github.actor != 'mindsdbadmin'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ vars.CI_PYTHON_VERSION }}
- name: Install dependencies
run: |
pip install .
pip install setuptools wheel twine build
- name: Clean previous builds
run: rm -rf dist/ build/ *.egg-info
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
twine upload dist/*
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ dependencies = [
]
dynamic = ["version"]

[tool.setuptools.dynamic]
version = {attr = "aipdf.__version__"}

[project.urls]
Homepage = "https://github.com/yourusername/aipdf"
Repository = "https://github.com/yourusername/aipdf.git"
Homepage = "https://github.com/mindsdb/aipdf"
Repository = "https://github.com/mindsdb/aipdf.git"

[tool.setuptools_scm]
6 changes: 5 additions & 1 deletion src/aipdf/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
from .ocr import ocr
from .ocr import ocr

__version__ = "0.0.1"

__all__ = ["__version__", "ocr"]