From e0f95bc86b35e0749cec9e87ab90d48d2f0d9416 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Wed, 9 Jul 2025 13:44:07 +0200 Subject: [PATCH] Fix deprecated set-output for pip-cache in GHA jobs See: - https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ - https://github.com/actions/setup-python#caching-packages-dependencies - https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages --- .github/workflows/release.yml | 16 +++------------- .github/workflows/test.yml | 17 +++-------------- 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ae375f..38218e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,19 +23,9 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.12' - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache - uses: actions/cache@v4 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: release-${{ hashFiles('**/setup.py') }} - restore-keys: | - release- + cache: pip + cache-dependency-path: | + **/pyproject.toml - name: Install dependencies run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 279f652..5fa02dc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,20 +39,9 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache - uses: actions/cache@v4 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: - ${{ matrix.python-version }}-v1-${{ hashFiles('**/pyproject.toml') }} - restore-keys: | - ${{ matrix.python-version }}-v1- + cache: pip + cache-dependency-path: | + **/pyproject.toml - name: Install dependencies run: |