diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index eebdcd9..31831e8 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -2,35 +2,39 @@ name: Publish distributions to PyPI or TestPyPI # TestPyPI upload is scheduled in each weekday. # PyPI upload is only activated if the release is published. +# on: +# schedule: +# - cron: '0 15 * * *' +# release: +# types: +# - published + on: - schedule: - - cron: '0 15 * * *' - release: - types: - - published + push: + branches: + - main jobs: build-n-publish: name: Build and publish Python distributions to PyPI or TestPyPI - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest # Not intended for forks. if: github.repository == 'gen740/pygen' steps: - uses: actions/checkout@v3 - - name: Set up Python 3.10 + - name: Setup Python3.10 uses: actions/setup-python@v4 with: - python-version: 3.10 + python-version: "3.10" - - name: Install twine - run: | - python -m pip install -U pip build + - name: Install Poetry + uses: snok/install-poetry@v1 - name: Build a tar ball run: | - python -m build --sdist --wheel + poetry build - name: Publish distribution to TestPyPI # The following upload action cannot be executed in the forked repository. diff --git a/pyproject.toml b/pyproject.toml index 385035d..e0adbd5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.pyright] -include = ["template"] +include = [] exclude = ["**/node_modules", "**/__pycache__"] @@ -9,7 +9,7 @@ pythonVersion = "3.10" pythonPlatform = "Darwin" [tool.poetry] -name = "pybind11-pygen" +name = "pygen" version = "0.1.0" description = "A simple c++ code generator for pybind11" readme = "README.md" @@ -18,6 +18,8 @@ authors = ["Gen740 "] [tool.poetry.scripts] pygen = 'pygen.__main__:run' +[tool.setuptools.packages.find] +where = ["."] [tool.poetry.dependencies] python = "^3.10"