diff --git a/.github/workflows/python-publish.yaml b/.github/workflows/python-publish.yaml index 239c8b45c..f3b20d2b6 100644 --- a/.github/workflows/python-publish.yaml +++ b/.github/workflows/python-publish.yaml @@ -18,7 +18,6 @@ permissions: jobs: deploy: - if: "success() && startsWith(github.ref, 'refs/tags/')" runs-on: ubuntu-latest steps: @@ -31,13 +30,14 @@ jobs: run: | python -m pip install --upgrade pip pip install build + - name: Build package + run: python -m build - name: check tag id: check-tag run: python check_tag.py - - name: Build package - run: python -m build - name: Publish package uses: pypa/gh-action-pypi-publish@v1.8.3 with: user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + password: ${{ secrets.TEST_PYPI_TOKEN }} + repository-url: https://test.pypi.org/legacy/ diff --git a/check_tag.py b/check_tag.py index 16c6f2775..e19d4d75a 100644 --- a/check_tag.py +++ b/check_tag.py @@ -34,7 +34,7 @@ def read(file_name): def main(env_var="GITHUB_REF") -> int: git_ref = os.getenv(env_var, "none") tag = re.sub("^refs/tags/v*", "", git_ref.lower()) - version = read("version.txt").strip() + version = read("pyatlan/version.txt").strip() if tag == version: return 0 else: diff --git a/version.txt b/pyatlan/version.txt similarity index 100% rename from version.txt rename to pyatlan/version.txt diff --git a/setup.py b/setup.py index a785d29d1..80fa3b94d 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ def read(file_name): setup( name="pyatlan", - version=read("version.txt"), + version=read("pyatlan/version.txt"), author="Atlan Technologies Pvt Ltd", author_email="engineering@atlan.com", description="Atlan Python Client",