From 028fc4619341cef89e7c7f4d3cd246caffcdfc93 Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Tue, 5 Dec 2023 20:26:51 +0100 Subject: [PATCH 1/2] fix: remove manual caching from CI Ref: https://github.com/actions/setup-node#caching-global-packages-data --- .github/workflows/ci.yml | 8 +------- .github/workflows/release-automated.yml | 19 ++++--------------- .github/workflows/release-manual-docs.yml | 10 ++-------- 3 files changed, 7 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 702ab3d8a..7a424822e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,13 +60,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.NODE_VERSION }} - - name: Cache Node.js modules - uses: actions/cache@v3 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}- + cache: npm - run: npm ci - run: npm run lint - run: npm test -- --maxWorkers=4 diff --git a/.github/workflows/release-automated.yml b/.github/workflows/release-automated.yml index 6f10c8312..bf6df2510 100644 --- a/.github/workflows/release-automated.yml +++ b/.github/workflows/release-automated.yml @@ -19,13 +19,8 @@ jobs: with: node-version: 18 registry-url: https://registry.npmjs.org/ - - name: Cache Node.js modules - uses: actions/cache@v2 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + cache: npm + - run: npm ci - run: npx semantic-release env: @@ -35,7 +30,7 @@ jobs: - name: Determine tag on current commit id: tag run: echo "::set-output name=current_tag::$(git describe --tags --abbrev=0 --exact-match || echo '')" - + docs-publish: needs: release if: needs.release.outputs.current_tag != '' && github.ref == 'refs/heads/release' @@ -49,13 +44,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: 16 - - name: Cache Node.js modules - uses: actions/cache@v2 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + cache: npm - name: Generate Docs run: | npm ci diff --git a/.github/workflows/release-manual-docs.yml b/.github/workflows/release-manual-docs.yml index 89c797146..83b950de7 100644 --- a/.github/workflows/release-manual-docs.yml +++ b/.github/workflows/release-manual-docs.yml @@ -4,7 +4,7 @@ on: inputs: tag: default: '' - description: 'Version tag:' + description: 'Version tag:' jobs: docs-publish: if: github.event.inputs.tag != '' @@ -18,13 +18,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: 16 - - name: Cache Node.js modules - uses: actions/cache@v2 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + cache: npm - name: Generate Docs run: | npm ci From 45ca8ab4a74c0e65f2441f97838e8e733ddc94f3 Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:31:10 +0100 Subject: [PATCH 2/2] Update .github/workflows/release-automated.yml Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com> --- .github/workflows/release-automated.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-automated.yml b/.github/workflows/release-automated.yml index bf6df2510..95287d2c9 100644 --- a/.github/workflows/release-automated.yml +++ b/.github/workflows/release-automated.yml @@ -20,7 +20,6 @@ jobs: node-version: 18 registry-url: https://registry.npmjs.org/ cache: npm - - run: npm ci - run: npx semantic-release env: