From 415355e6347d143c0804ec4fa3d08ad1cad365cb Mon Sep 17 00:00:00 2001 From: vladvildanov Date: Fri, 20 Dec 2024 17:20:38 +0200 Subject: [PATCH 1/7] Added publishing workflow, bump version --- .github/workflows/pypi_publish.yml | 38 ++++++++++++++++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pypi_publish.yml diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml new file mode 100644 index 0000000..f8f043e --- /dev/null +++ b/.github/workflows/pypi_publish.yml @@ -0,0 +1,38 @@ +name: Publish tag to Pypi + +on: + release: + types: [published] + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + + build_and_package: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: install python + uses: actions/setup-python@v5 + with: + python-version: 3.9 + - name: Install dev tools + run: | + pip install -r dev_requirements.txt + pip install twine wheel + + - name: Build package + run: | + python setup.py build + python setup.py sdist bdist_wheel + + - name: Basic package test prior to upload + run: | + twine check dist/* + + - name: Publish to Pypi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 35e5f2d..16c922f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "redispy-entraid-credentials" -version = "0.0.1" +version = "0.1.0" authors = [ { name="Redis Inc.", email="oss@redis.com" }, ] From dfc345b861e060ede44f117e8cb22f871f2577aa Mon Sep 17 00:00:00 2001 From: vladvildanov Date: Fri, 20 Dec 2024 17:32:10 +0200 Subject: [PATCH 2/7] Added beta prefix --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 16c922f..63d4545 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "redispy-entraid-credentials" -version = "0.1.0" +version = "0.1.0b1" authors = [ { name="Redis Inc.", email="oss@redis.com" }, ] From 957aba70792f30c54610aac15157f65544d4b690 Mon Sep 17 00:00:00 2001 From: vladvildanov Date: Fri, 20 Dec 2024 19:32:51 +0200 Subject: [PATCH 3/7] Updated redis version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 63d4545..5c4b39b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ description = "Entra ID credentials provider implementation for Redis-py client" readme = "README.md" requires-python = ">=3.8" dependencies = [ - "redis @ git+https://github.com/redis/redis-py.git/@vv-tba-support", + "redis @ git+https://github.com/redis/redis-py.git/@main", "PyJWT~=2.9.0", "msal~=1.31.0", ] From 75e7aec9f57dca6ee575cbde12101b8166889355 Mon Sep 17 00:00:00 2001 From: vladvildanov Date: Fri, 20 Dec 2024 19:34:51 +0200 Subject: [PATCH 4/7] Updated package name --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5c4b39b..7f70eed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" [project] -name = "redispy-entraid-credentials" +name = "redis-entraid" version = "0.1.0b1" authors = [ { name="Redis Inc.", email="oss@redis.com" }, From 55573325e9dd48441286bc5b72ff6a6cac9fa7d4 Mon Sep 17 00:00:00 2001 From: vladvildanov Date: Fri, 20 Dec 2024 19:40:47 +0200 Subject: [PATCH 5/7] Updated branch name --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7f70eed..4a23b5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ description = "Entra ID credentials provider implementation for Redis-py client" readme = "README.md" requires-python = ">=3.8" dependencies = [ - "redis @ git+https://github.com/redis/redis-py.git/@main", + "redis @ git+https://github.com/redis/redis-py.git/@master", "PyJWT~=2.9.0", "msal~=1.31.0", ] From e22aac6da141769900409f8eb6fe3db3113188dc Mon Sep 17 00:00:00 2001 From: vladvildanov Date: Fri, 20 Dec 2024 20:27:41 +0200 Subject: [PATCH 6/7] Updated dependency and README --- README.md | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c6a50d3..e3e3dda 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Installation ```bash -pip install redispy-entraid-credentials +pip install redis-entraid ``` ## Usage diff --git a/pyproject.toml b/pyproject.toml index 4a23b5f..5c6b649 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ description = "Entra ID credentials provider implementation for Redis-py client" readme = "README.md" requires-python = ">=3.8" dependencies = [ - "redis @ git+https://github.com/redis/redis-py.git/@master", + "redis~=5.3.0b3", "PyJWT~=2.9.0", "msal~=1.31.0", ] From 9418ef69b9d0eb750779e01210abed80aeaefdf7 Mon Sep 17 00:00:00 2001 From: vladvildanov Date: Fri, 20 Dec 2024 20:44:21 +0200 Subject: [PATCH 7/7] Fixed workflow --- .github/workflows/pypi_publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml index f8f043e..8a6227c 100644 --- a/.github/workflows/pypi_publish.yml +++ b/.github/workflows/pypi_publish.yml @@ -3,6 +3,7 @@ name: Publish tag to Pypi on: release: types: [published] + workflow_dispatch: permissions: contents: read # to fetch code (actions/checkout) @@ -20,12 +21,11 @@ jobs: - name: Install dev tools run: | pip install -r dev_requirements.txt - pip install twine wheel + pip install twine wheel build - name: Build package run: | - python setup.py build - python setup.py sdist bdist_wheel + python -m build - name: Basic package test prior to upload run: |