diff --git a/.github/workflows/python-publishtest.yml b/.github/workflows/python-publishtest.yml index e7d7688..2dc4fef 100644 --- a/.github/workflows/python-publishtest.yml +++ b/.github/workflows/python-publishtest.yml @@ -9,26 +9,18 @@ on: - '!**' - 'cm_text/version.py' -jobs: - deploy: - runs-on: windows-latest +jobs: + testpypi-publish: + name: Upload release to test PyPI + runs-on: ubuntu-latest + environment: + name: testpypi + url: https://test.pypi.org/p/cm-text-sdk-python + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --user --upgrade setuptools wheel - python setup.py sdist bdist_wheel - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - python -m pip install --user --upgrade twine - python -m twine upload --repository testpypi --skip-existing dist/* + - 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 diff --git a/cm_text/version.py b/cm_text/version.py index b582441..21206b8 100644 --- a/cm_text/version.py +++ b/cm_text/version.py @@ -1,2 +1 @@ - -__version__ = '2.0.4' +__version__ = '2.0.4' \ No newline at end of file