Skip to content

Commit

Permalink
build: add cache release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
trigoporres committed Nov 8, 2024
1 parent 6164d90 commit 116cc38
Showing 1 changed file with 58 additions and 9 deletions.
67 changes: 58 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,25 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧
uses: ./.github/workflows/setup-node
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: |
node_modules
~/.npm
**/dist
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Set Node v20
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci

- name: Generate dist
run: npm run build
Expand All @@ -47,8 +64,17 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧
uses: ./.github/workflows/setup-node
- name: Use node modules cache
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: |
node_modules
~/.npm
**/dist
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}

- name: Run linter
run: npm run lint
Expand All @@ -61,8 +87,17 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧
uses: ./.github/workflows/setup-node
- name: Use node modules cache
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: |
node_modules
~/.npm
**/dist
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}

- name: Run tests
run: npm run test:ci
Expand All @@ -76,9 +111,23 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧
uses: ./.github/workflows/setup-node

- name: Set node v20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
registry-url: https://registry.npmjs.org/
- name: Use node modules cache
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: |
node_modules
~/.npm
**/dist
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Setup Git config
run: |
git config --global user.name 'Devo GitHub Action'
Expand Down

0 comments on commit 116cc38

Please sign in to comment.