diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 7fa0636..b9fddb8 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.2 + uses: pypa/cibuildwheel@v2.21.2 env: CIBW_SKIP: pp* CIBW_TEST_COMMAND: python -m unittest discover ephem diff --git a/.github/workflows/github-deploy.yml b/.github/workflows/github-deploy.yml index c557c3f..ecd955f 100644 --- a/.github/workflows/github-deploy.yml +++ b/.github/workflows/github-deploy.yml @@ -52,21 +52,31 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 name: Install Python with: python-version: '3.8' + - name: Generate build name for artifact upload + id: build-name + run: | + name="" + if [[ -n "${{ matrix.build }}" ]]; then + name="-$(echo ${{ matrix.build }} | tr -d *-_)" + fi + echo "name: ${name}" + echo "name=${name}" >> $GITHUB_OUTPUT + # https://cibuildwheel.readthedocs.io/en/stable/faq/#emulation # offers this stanza plus “CIBW_ARCHS_LINUX” below: - name: Set up QEMU if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 with: platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v2.16.2 + uses: pypa/cibuildwheel@v2.21.2 env: CIBW_ARCHS: ${{ matrix.arch }} CIBW_BUILD: ${{ matrix.build }} @@ -75,9 +85,11 @@ jobs: CIBW_TEST_REQUIRES: tzdata CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64" - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: + name: wheels-${{ matrix.os }}-${{ matrix.arch }}${{ steps.build-name.outputs.name }} path: ./wheelhouse/*.whl + overwrite: true build_sdist: name: Build source distribution @@ -85,7 +97,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 name: Install Python with: python-version: '3.8' @@ -93,22 +105,25 @@ jobs: - name: Build sdist run: python setup.py sdist - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: wheels-sdist path: dist/*.tar.gz + overwrite: true upload_pypi: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: artifact + pattern: wheels-* path: dist + merge-multiple: true - - uses: pypa/gh-action-pypi-publish@master + - uses: pypa/gh-action-pypi-publish@release/v1 with: - skip_existing: true + skip-existing: true user: __token__ password: ${{ secrets.pypi_password }} # To test: repository_url: https://test.pypi.org/legacy/ diff --git a/setup.py b/setup.py index ec0b836..0d44e25 100644 --- a/setup.py +++ b/setup.py @@ -79,6 +79,7 @@ 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', ], packages = [ 'ephem', 'ephem.tests' ], package_data = { 'ephem': ['doc/*.rst',