Skip to content

Commit

Permalink
Add caching for the jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
rushi committed Feb 18, 2024
1 parent 6866290 commit a0351f5
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 16
cache: "npm"
cache-dependency-path: "package-lock.json"

- name: Install dependencies
run: npm ci
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/deploy-icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: "package-lock.json"
registry-url: https://registry.npmjs.org/

- run: cd src/icons && pwd && npm ci
- run: cd src/icons && pwd && npm publish --tag ${{ github.event.inputs.tag }}

- name: Publish to @xola/icons
run: cd src/icons && pwd && npm publish --tag ${{ github.event.inputs.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: "package-lock.json"
registry-url: https://registry.npmjs.org/

- run: npm ci

- run: npm run build

- run: npm publish --tag ${{ github.event.inputs.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/eslint-annotate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
with:
node-version: 16
cache: "npm"
cache-dependency-path: "package-lock.json"

# - run: git config --global url."https://${{ secrets.ES_LINT_TOKEN }}@github.com/".insteadOf ssh://[email protected]/

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: 16
cache: "npm"
cache-dependency-path: "package-lock.json"

- name: Install Node Dependencies
run: npm ci
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: "package-lock.json"

- name: Install dependencies
run: npm ci
Expand Down

0 comments on commit a0351f5

Please sign in to comment.