From 003533133a28cb6151d519eeee11ef41ef504be7 Mon Sep 17 00:00:00 2001 From: Yusuke Matsui Date: Thu, 26 Oct 2023 20:56:48 +0900 Subject: [PATCH 1/8] publish automatically --- .github/workflows/publish.yml | 23 +++++++++++++++++++++++ nanopq/__init__.py | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ab41e60 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,23 @@ +name: Publishing + +on: [push] + +jobs: + pypi-publish: + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/nanopq + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + steps: + # retrieve your distributions here + + # - name: Publish package distributions to PyPI + # uses: pypa/gh-action-pypi-publish@release/v1 + + - name: Publish package distributions to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ \ No newline at end of file diff --git a/nanopq/__init__.py b/nanopq/__init__.py index 37b70ef..3993f10 100644 --- a/nanopq/__init__.py +++ b/nanopq/__init__.py @@ -1,5 +1,5 @@ __all__ = ["PQ", "OPQ", "DistanceTable", "nanopq_to_faiss", "faiss_to_nanopq"] -__version__ = "0.2.0" +__version__ = "0.2.1" from .convert_faiss import faiss_to_nanopq, nanopq_to_faiss from .opq import OPQ From 9a2ca24fb3d296881f2db40f13eafb0cddf108d6 Mon Sep 17 00:00:00 2001 From: Yusuke Matsui Date: Thu, 26 Oct 2023 20:59:17 +0900 Subject: [PATCH 2/8] typo --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ab41e60..0daac09 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,5 +19,5 @@ jobs: - name: Publish package distributions to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ \ No newline at end of file + with: + repository-url: https://test.pypi.org/legacy/ \ No newline at end of file From 731379a6d10c39ae4274ec19945dda7b0bdb5089 Mon Sep 17 00:00:00 2001 From: Yusuke Matsui Date: Thu, 26 Oct 2023 21:01:32 +0900 Subject: [PATCH 3/8] change environment --- .github/workflows/publish.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0daac09..53f6aab 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,9 +6,7 @@ jobs: pypi-publish: name: Upload release to PyPI runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/nanopq + environment: release permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: From 12e0c0e3b2f8b7c8506b807a5615250c00d79ddd Mon Sep 17 00:00:00 2001 From: Yusuke Matsui Date: Thu, 26 Oct 2023 21:04:41 +0900 Subject: [PATCH 4/8] build --- .github/workflows/publish.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 53f6aab..562dacf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,6 +15,10 @@ jobs: # - name: Publish package distributions to PyPI # uses: pypa/gh-action-pypi-publish@release/v1 + - name: Build package + runs: | + make build + - name: Publish package distributions to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: From c1e9b9625e5155fb73a49e99b277a995443b0530 Mon Sep 17 00:00:00 2001 From: Yusuke Matsui Date: Thu, 26 Oct 2023 21:06:07 +0900 Subject: [PATCH 5/8] typo --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 562dacf..bb1f748 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,7 +16,7 @@ jobs: # uses: pypa/gh-action-pypi-publish@release/v1 - name: Build package - runs: | + run: | make build - name: Publish package distributions to TestPyPI From 1a4d757b7612bc5d18255afba6f884d168c00afc Mon Sep 17 00:00:00 2001 From: Yusuke Matsui Date: Thu, 26 Oct 2023 21:15:32 +0900 Subject: [PATCH 6/8] not use make --- .github/workflows/publish.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bb1f748..a13768c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,9 +15,14 @@ jobs: # - name: Publish package distributions to PyPI # uses: pypa/gh-action-pypi-publish@release/v1 + - name: Checkout + uses: actions/checkout@v4 + - name: Build package run: | - make build + python setup.py sdist bdist_wheel + ls + - name: Publish package distributions to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 From 5152a007abc4c0a988498acd96fd81bef219eda0 Mon Sep 17 00:00:00 2001 From: Yusuke Matsui Date: Thu, 26 Oct 2023 21:25:52 +0900 Subject: [PATCH 7/8] delete test pypi. Use the original pypi only --- .github/workflows/publish.yml | 9 +-------- nanopq/__init__.py | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a13768c..30a4d21 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,19 +12,12 @@ jobs: steps: # retrieve your distributions here - # - name: Publish package distributions to PyPI - # uses: pypa/gh-action-pypi-publish@release/v1 - - name: Checkout uses: actions/checkout@v4 - name: Build package run: | python setup.py sdist bdist_wheel - ls - - - name: Publish package distributions to TestPyPI + - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ \ No newline at end of file diff --git a/nanopq/__init__.py b/nanopq/__init__.py index 3993f10..41124cf 100644 --- a/nanopq/__init__.py +++ b/nanopq/__init__.py @@ -1,5 +1,5 @@ __all__ = ["PQ", "OPQ", "DistanceTable", "nanopq_to_faiss", "faiss_to_nanopq"] -__version__ = "0.2.1" +__version__ = "0.2.1.dev1" from .convert_faiss import faiss_to_nanopq, nanopq_to_faiss from .opq import OPQ From 0318cd7e92a2b05dcfab1f5cba1d9164bfab79ef Mon Sep 17 00:00:00 2001 From: Yusuke Matsui Date: Thu, 26 Oct 2023 21:29:14 +0900 Subject: [PATCH 8/8] 0.2.1 --- nanopq/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nanopq/__init__.py b/nanopq/__init__.py index 41124cf..3993f10 100644 --- a/nanopq/__init__.py +++ b/nanopq/__init__.py @@ -1,5 +1,5 @@ __all__ = ["PQ", "OPQ", "DistanceTable", "nanopq_to_faiss", "faiss_to_nanopq"] -__version__ = "0.2.1.dev1" +__version__ = "0.2.1" from .convert_faiss import faiss_to_nanopq, nanopq_to_faiss from .opq import OPQ