diff --git a/.github/workflows/publish.workflow.yaml b/.github/workflows/publish.workflow.yaml new file mode 100644 index 0000000..7986667 --- /dev/null +++ b/.github/workflows/publish.workflow.yaml @@ -0,0 +1,21 @@ +name: Publish + +on: + push: + tags: + - 'v*' + +jobs: + publish: + runs-on: ubuntu-latest + timeout-minutes: 30 + permissions: + contents: read + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build package + run: make package + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..0572b0e --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +prune .github/ +prune tests/ \ No newline at end of file diff --git a/Makefile b/Makefile index f5717bf..abe2e07 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,9 @@ install-pre-commit: style: pre-commit run --all-files +clean: + rm -fr *.egg-info test-results .cache _sqlmesh_upstream logs .mypy_cache .pytest_cache .ruff_cache dist + package: pip3 install build && python3 -m build diff --git a/pyproject.toml b/pyproject.toml index 8b1167e..864cc28 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ requires = ["setuptools", "setuptools_scm"] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] -exclude=["tests"] +include=["sqlmesh_utils*"] [tool.setuptools_scm] version_file = "sqlmesh_utils/_version.py"