Skip to content

Commit

Permalink
ci: Remove manual caching for actions/setup-node (#2064)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikeee authored Feb 15, 2024
1 parent 8508b8e commit a0623b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 30 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/release-automated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@ 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:
Expand All @@ -35,7 +29,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'
Expand All @@ -49,13 +43,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
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/release-manual-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
inputs:
tag:
default: ''
description: 'Version tag:'
description: 'Version tag:'
jobs:
docs-publish:
if: github.event.inputs.tag != ''
Expand All @@ -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
Expand Down

0 comments on commit a0623b0

Please sign in to comment.