diff --git a/.github/workflows/python-package.yaml b/.github/workflows/python-package.yaml index 76f141fc6..a656015d6 100644 --- a/.github/workflows/python-package.yaml +++ b/.github/workflows/python-package.yaml @@ -7,6 +7,7 @@ on: env: IMAGE_TAG: protoc-gen-validate:${{ github.sha }} + REF_NAME: ${{ github.ref_name }} jobs: deploy: @@ -25,9 +26,8 @@ jobs: load: true push: false tags: ${{ env.IMAGE_TAG }} - - name: Run - run: | docker run --rm \ --env PYPI_REPO=pypi \ --env PGV_PYPI_TOKEN="${{ secrets.PGV_PYPI_TOKEN }}" \ - ${{ env.IMAGE_TAG }} python-release + ${{ env.IMAGE_TAG }} SETUPTOOLS_SCM_PRETEND_VERSION=${{ env.REF_NAME }} python-release diff --git a/python/pyproject.toml b/python/pyproject.toml index 374b58cbf..f682775a2 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,6 +1,8 @@ [build-system] requires = [ - "setuptools>=42", + "setuptools>=45", + "setuptools_scm[toml]>=6.2", "wheel" ] build-backend = "setuptools.build_meta" +[tool.setuptools_scm] diff --git a/python/setup.cfg b/python/setup.cfg index 5c16d5170..2fef6dd1e 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,12 +1,12 @@ [metadata] name = protoc-gen-validate -version = 0.4.2 -author = Envoyproxy -author_email = dev@lyft.com +version = env: SETUPTOOLS_SCM_PRETEND_VERSION +author = Buf +author_email = dev@buf.build description = PGV for python via just-in-time code generation long_description = file: README.md long_description_content_type = text/markdown -url = https://github.com/envoyproxy/protoc-gen-validate +url = https://github.com/bufbuild/protoc-gen-validate license_files = LICENSE classifiers = Programming Language :: Python :: 3 diff --git a/requirements.txt b/requirements.txt index b2419b0c1..1937930ce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,5 +5,6 @@ isort==5.7.0 build==0.3.0 twine==3.3.0 wheel==0.36.2 -setuptools==53.0.0 -protobuf==3.20.2 \ No newline at end of file +setuptools==65.5.0 +protobuf==3.20.2 +setuptools_scm[toml]>=6.2