diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..e817d84 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,31 @@ +name: Publish Package + +on: [push] + +jobs: + build and publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install Poetry + uses: abatilo/actions-poetry@v3 + with: + poetry-version: 1.8.5 + + - name: Install Poetry plugins + run: | + poetry self add poetry-plugin-export + + - name: Build package + run: | + poetry build + ls -la dist/ diff --git a/.github/workflows/install-pkg.yml b/.github/workflows/test_package.yml similarity index 97% rename from .github/workflows/install-pkg.yml rename to .github/workflows/test_package.yml index c9771d3..8e29d6b 100644 --- a/.github/workflows/install-pkg.yml +++ b/.github/workflows/test_package.yml @@ -1,6 +1,6 @@ name: Test Package Installation -on: [push, pull_request] +on: workflow_dispatch #[push, pull_request] jobs: build: diff --git a/pyproject.toml b/pyproject.toml index 80ef522..a3acd02 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"] +build-backend = "poetry_dynamic_versioning.backend" [tool.poetry] name = "ipybox" -version = "0.3.1" +version = "0.0.0" description = "Python code execution sandbox based on IPython and Docker" homepage = "https://github.com/gradion-ai/ipybox" readme = "README.md" @@ -60,3 +60,8 @@ module = [ "aiofiles.os", ] ignore_missing_imports = true + +[tool.poetry-dynamic-versioning] +enable = true +vcs = "git" +pattern = '(?P\d+\.\d+\.\d+)'