From ec21cdbef84a39f12388bf26fad6f451fc575a43 Mon Sep 17 00:00:00 2001 From: Thomas Schmidt Date: Wed, 25 Oct 2023 08:38:42 +0200 Subject: [PATCH] PyPI setup --- .github/workflows/publish-to-pypi.yml | 31 +++++++++++++++++++ .../{python-package.yml => test-package.yml} | 2 +- pyproject.toml | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish-to-pypi.yml rename .github/workflows/{python-package.yml => test-package.yml} (99%) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 0000000..7e27ad6 --- /dev/null +++ b/.github/workflows/publish-to-pypi.yml @@ -0,0 +1,31 @@ +name: Publish to PyPI + +on: + release: + types: + - created + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.11 + + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1 + - name: Install dependencies + run: | + poetry install --all-extras + + - name: Publish to PyPI + run: | + poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} + poetry publish --build --verbose --no-interaction diff --git a/.github/workflows/python-package.yml b/.github/workflows/test-package.yml similarity index 99% rename from .github/workflows/python-package.yml rename to .github/workflows/test-package.yml index eff7621..37ba202 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/test-package.yml @@ -9,7 +9,7 @@ on: pull_request: jobs: - build: + test: runs-on: ubuntu-latest strategy: diff --git a/pyproject.toml b/pyproject.toml index 88d210c..e9dffd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] -name = "sql_mock" +name = "sql-mock" version = "0.1.0" description = "Simplify the testing of SQL data models and queries by allowing users to mock input data and create tests for various scenarios. It provides a consistent and convenient way to test the execution of your query without the need to process a massive amount of data." repository = "https://github.com/DeepLcom/sql-mock"