From efe1847d38803716707578f08a55825b5af68992 Mon Sep 17 00:00:00 2001 From: fransisnk Date: Thu, 30 Apr 2020 16:37:38 +0200 Subject: [PATCH] Add PyPI deploy job --- .github/workflows/deploy.yml | 42 ++++++++++++++++++++++++++++++++++++ pandas_cacher/__init__.py | 2 +- pyproject.toml | 2 +- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..e86ba64 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,42 @@ +name: Deploy to PyPI + +on: + release: + types: [created] + +jobs: + Deploying: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + + - name: Get full python version + id: full-python-version + shell: bash + run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") + + - name: Install poetry + shell: bash + run: | + curl -fsS -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py + python get-poetry.py --preview -y + echo "::set-env name=PATH::$HOME/.poetry/bin:$PATH" + + - name: Configure poetry + shell: bash + run: poetry config virtualenvs.in-project true + + - name: Install dependencies + shell: bash + run: poetry install + + - name: Build and publish to PyPI + run: | + poetry config pypi-token.pypi ${{ secrets.pypi_push_token }} + poetry publish --build diff --git a/pandas_cacher/__init__.py b/pandas_cacher/__init__.py index a5a9746..2e0f085 100644 --- a/pandas_cacher/__init__.py +++ b/pandas_cacher/__init__.py @@ -1,3 +1,3 @@ from pandas_cacher.pandas_cache import pandas_cache # noqa: F401 -VERSION = "0.1.1" +VERSION = "0.1.2" diff --git a/pyproject.toml b/pyproject.toml index acc6cc8..2cbd674 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pandas_cacher" -version = "0.1.1" +version = "0.1.2" description = "Pandas cacher" authors = ["Statnett Datascience "]