diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 58d68276..1a5cdb30 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,6 +10,8 @@ updates: - "*" # Group all Actions updates into a single larger pull request schedule: interval: weekly + cooldown: + default-days: 7 - package-ecosystem: "pip" directory: "/" groups: @@ -18,3 +20,5 @@ updates: - "*" # Group all pip updates into a single larger pull request schedule: interval: weekly + cooldown: + default-days: 7 diff --git a/.github/workflows/node-gyp.yml b/.github/workflows/node-gyp.yml index 29c41d2f..56cb6dfd 100644 --- a/.github/workflows/node-gyp.yml +++ b/.github/workflows/node-gyp.yml @@ -29,18 +29,20 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Clone gyp-next - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: path: gyp-next + persist-credentials: false - name: Clone nodejs/node-gyp - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: nodejs/node-gyp path: node-gyp - - uses: actions/setup-node@v7 + persist-credentials: false + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: "lts/*" - - uses: actions/setup-python@v7 + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 113707e3..35ce0778 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -3,7 +3,7 @@ on: push: pull_request: workflow_dispatch: - +permissions: {} jobs: nodejs-integration: strategy: @@ -24,15 +24,17 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Clone gyp-next - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: path: gyp-next + persist-credentials: false - name: Clone nodejs/node - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: nodejs/node path: node - - uses: actions/setup-python@v7 + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index 27296e7a..66555a5b 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -5,16 +5,18 @@ on: push: pull_request: workflow_dispatch: - +permissions: {} jobs: Python_lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Lint with ruff # See pyproject.toml for settings - uses: astral-sh/ruff-action@v4.1.0 + uses: astral-sh/ruff-action@278981a28ce3188b1e39527901f38254bf3aac89 # v4.1.0 - run: ruff format --check --diff - - uses: wagoid/commitlint-github-action@v6 + - uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1 Python_tests: runs-on: ${{ matrix.os }} @@ -33,13 +35,15 @@ jobs: - os: windows-2025-vs2026 # Windows with Visual Studio 2026 python-version: 3.x steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true - - uses: seanmiddleditch/gha-setup-ninja@v6 + - uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 32f260de..92138f14 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -3,6 +3,8 @@ on: branches: - main +permissions: {} + name: release-please jobs: release-please: @@ -14,7 +16,7 @@ jobs: contents: write pull-requests: write steps: - - uses: google-github-actions/release-please-action@v4 + - uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1 id: release build: @@ -24,11 +26,13 @@ jobs: if: ${{ needs.release-please.outputs.release_created }} # only publish on release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Build a binary wheel and a source tarball run: pipx run build - name: Store the distribution packages - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: python-package-distributions path: dist/ @@ -48,12 +52,12 @@ jobs: id-token: write # IMPORTANT: mandatory for trusted publishing steps: - name: Download all the dists - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: python-package-distributions path: dist/ - name: Publish distribution to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 github-release: name: >- @@ -68,12 +72,12 @@ jobs: id-token: write # IMPORTANT: mandatory for sigstore steps: - name: Download all the dists - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: python-package-distributions path: dist/ - name: Sign the dists with Sigstore - uses: sigstore/gh-action-sigstore-python@v3.5.0 + uses: sigstore/gh-action-sigstore-python@790bc6befb9d733738f18d8f895854b453640ec9 # v3.5.0 with: inputs: >- ./dist/*.tar.gz @@ -81,10 +85,11 @@ jobs: - name: Upload artifact signatures to GitHub Release env: GITHUB_TOKEN: ${{ github.token }} + NEEDS_RELEASE_PLEASE_OUTPUTS_TAG_NAME: ${{ needs.release-please.outputs.tag_name }} # Upload to GitHub Release using the `gh` CLI. # `dist/` contains the built packages, and the # sigstore-produced signatures and certificates. run: >- gh release upload - ${{ needs.release-please.outputs.tag_name }} dist/** + ${NEEDS_RELEASE_PLEASE_OUTPUTS_TAG_NAME} dist/** --repo '${{ github.repository }}'