diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..13a3142 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,20 @@ +version: 2 +updates: + # GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + groups: + actions: + patterns: + - "*" + assignees: + - "@mongodb/dbx-python" + # Python + - package-ecosystem: "pip" + directory: "/bindings/python" + schedule: + interval: "weekly" + assignees: + - "@mongodb/dbx-python" \ No newline at end of file diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index e6a61ab..69e1957 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -19,7 +19,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-12, windows-2019, ubuntu-latest] + os: [macos-14, windows-2019, ubuntu-latest] name: Build CPython ${{ matrix.python-version }}-${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -28,9 +28,9 @@ jobs: CIBW_ARCHS_MACOS: x86_64 universal2 CIBW_TEST_SKIP: '*universal2:arm64' CIBW_BUILD: "cp38-macosx_universal2 cp38-win* cp38-manylinux_{x86_64,i686}" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: python_bsonjs-3.8-${{ matrix.os }}-wheel + name: ${{ matrix.os }}-wheel path: ./wheelhouse/*.whl if-no-files-found: error test_non_linux_wheels: @@ -48,9 +48,9 @@ jobs: python-version: ${{ matrix.python-version }} allow-prereleases: true - name: Download a previously created wheel - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: - name: python_bsonjs-3.8-${{ matrix.os }}-wheel + name: ${{ matrix.os }}-wheel - name: Test wheel shell: bash run: | @@ -71,9 +71,9 @@ jobs: name: Test CPython ${{ matrix.python-version }}-${{ matrix.container }} steps: - name: Download a previously created wheel - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: - name: python_bsonjs-3.8-${{ matrix.os }}-wheel + name: ${{ matrix.os }}-wheel - name: Test wheel run: | docker run --rm --volume `pwd`:/python quay.io/pypa/${{ matrix.container }} /bin/bash -c "/opt/python/${{ matrix.python-version }}/bin/python -m pip install -U pip && /opt/python/${{ matrix.python-version }}/bin/python -m pip install --find-links=/python/ --no-index python_bsonjs && /opt/python/${{ matrix.python-version }}/bin/python -m pip list | grep python-bsonjs && /opt/python/${{ matrix.python-version }}/bin/python -c 'from bsonjs import dumps'" @@ -90,7 +90,7 @@ jobs: run: | python -m pip install build python -m build --sdist - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: "sdist" path: dist/*.tar.gz @@ -100,15 +100,15 @@ jobs: name: Download Wheels steps: - name: Download all workflow run artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: Flatten directory working-directory: . run: | find . -mindepth 2 -type f -exec mv {} . \; find . -type d -empty -delete - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: all-dist-${{ github.head_ref || github.ref_name }} + name: all-dist-${{ github.run_id }} path: "./*" publish: # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#publishing-the-distribution-to-pypi @@ -120,9 +120,9 @@ jobs: id-token: write steps: - name: Download all the dists - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: all-dist-${{ github.head_ref || github.ref_name }} + name: all-dist--${{ github.run_id }} path: dist/ - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file