From a5952fd52df1670fe469c327c858ee8ad1dcc3e9 Mon Sep 17 00:00:00 2001 From: Joris Pennings Date: Thu, 13 Jun 2024 12:47:17 +0200 Subject: [PATCH] seperated the build and publish steps --- .github/workflows/python-publishtest.yml | 37 ++++++++++++++++++++---- cm_text/version.py | 2 +- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-publishtest.yml b/.github/workflows/python-publishtest.yml index 2dc4fef..2879a1a 100644 --- a/.github/workflows/python-publishtest.yml +++ b/.github/workflows/python-publishtest.yml @@ -10,8 +10,31 @@ on: - 'cm_text/version.py' jobs: + build: + name: Build distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: python3 -m build + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: dist/ + testpypi-publish: - name: Upload release to test PyPI + name: Publish Python distribution to testPyPI runs-on: ubuntu-latest environment: name: testpypi @@ -19,8 +42,10 @@ jobs: permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - - uses: actions/checkout@v2 - - id: build - uses: OpenAstronomy/build-python-dist@v1 - - name: Publish package distributions to testPyPI - uses: pypa/gh-action-pypi-publish@v1.8.14 \ No newline at end of file + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + 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 diff --git a/cm_text/version.py b/cm_text/version.py index 21206b8..f593cd5 100644 --- a/cm_text/version.py +++ b/cm_text/version.py @@ -1 +1 @@ -__version__ = '2.0.4' \ No newline at end of file +__version__ = '2.0.4'