From 3d415a26b8e4befcdcbacf9f8e46d674f936b89d Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 6 Oct 2024 20:51:48 +0200 Subject: [PATCH 1/2] Add twine check job --- .github/workflows/build-and-test.yml | 21 +++++++++++++++++++++ .github/workflows/github-deploy.yml | 7 +++++-- setup.py | 2 +- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 653d068..d55b89f 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -41,3 +41,24 @@ jobs: CIBW_SKIP: pp* CIBW_TEST_COMMAND: python -m unittest discover ephem CIBW_TEST_REQUIRES: tzdata + + twine_check: + name: Run twine check + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + name: Install Python + with: + python-version: '3.12' + + - name: Install dependencies + run: python -m pip install build twine + + - name: Build sdist and wheel + run: python -m build + + - name: Run twine check + run: ls dist/* | xargs twine check diff --git a/.github/workflows/github-deploy.yml b/.github/workflows/github-deploy.yml index 9de3156..566ac88 100644 --- a/.github/workflows/github-deploy.yml +++ b/.github/workflows/github-deploy.yml @@ -129,10 +129,13 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.8' + python-version: '3.12' + + - name: Install dependencies + run: python -m pip install build - name: Build sdist - run: python setup.py sdist + run: python -m build --sdist - uses: actions/upload-artifact@v4 with: diff --git a/setup.py b/setup.py index 0d44e25..186bc28 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ version = __version__, description = 'Compute positions of the planets and stars', long_description = README, - #long_description_content_type = 'text/x-rst', + long_description_content_type = 'text/x-rst', license = 'MIT', author = 'Brandon Rhodes', author_email = 'brandon@rhodesmill.org', From 59c5fadfc4bd1adb19f63ee0b0b6bf9f2237d1c2 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 6 Oct 2024 21:08:48 +0200 Subject: [PATCH 2/2] List files to upload --- .github/workflows/github-deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/github-deploy.yml b/.github/workflows/github-deploy.yml index 566ac88..d8693ad 100644 --- a/.github/workflows/github-deploy.yml +++ b/.github/workflows/github-deploy.yml @@ -153,6 +153,9 @@ jobs: path: dist merge-multiple: true + - name: List files to upload + run: ls -1 dist/ + - uses: pypa/gh-action-pypi-publish@release/v1 with: skip-existing: true