From 0baad02ebf50e7d74e7107f0bbfd320a7daea67e Mon Sep 17 00:00:00 2001 From: Joris Pennings Date: Thu, 13 Jun 2024 13:28:42 +0200 Subject: [PATCH] trying out twine auth with generated Github_token --- .github/workflows/python-publishtest.yml | 14 ++++++++------ cm_text/version.py | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-publishtest.yml b/.github/workflows/python-publishtest.yml index 2879a1a..66d7bb6 100644 --- a/.github/workflows/python-publishtest.yml +++ b/.github/workflows/python-publishtest.yml @@ -20,11 +20,7 @@ jobs: with: python-version: "3.x" - name: Install pypa/build - run: >- - python3 -m - pip install - build - --user + run: python3 -m pip install build - name: Build a binary wheel and a source tarball run: python3 -m build - name: Store the distribution packages @@ -41,6 +37,7 @@ jobs: url: https://test.pypi.org/p/cm-text-sdk-python permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + contents: read # Add the contents permission for accessing repository contents steps: - name: Download all the dists uses: actions/download-artifact@v3 @@ -48,4 +45,9 @@ jobs: name: python-package-distributions path: dist/ - name: Publish package distributions to testPyPI - uses: pypa/gh-action-pypi-publish@v1.8.14 \ No newline at end of file + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + run: | + python3 -m pip install twine + twine upload --repository testpypi dist/* \ No newline at end of file diff --git a/cm_text/version.py b/cm_text/version.py index f593cd5..21206b8 100644 --- a/cm_text/version.py +++ b/cm_text/version.py @@ -1 +1 @@ -__version__ = '2.0.4' +__version__ = '2.0.4' \ No newline at end of file