From a0351f5cb921db14f4bd94f68ee218ff8e8e47d1 Mon Sep 17 00:00:00 2001 From: Rushi Vishavadia Date: Sun, 18 Feb 2024 19:10:52 +0530 Subject: [PATCH] Add caching for the jobs --- .github/workflows/chromatic.yml | 4 +++- .github/workflows/deploy-icons.yml | 8 +++++++- .github/workflows/deploy.yml | 6 ++++++ .github/workflows/eslint-annotate.yml | 1 + .github/workflows/eslint.yml | 2 ++ .github/workflows/publish.yml | 2 ++ 6 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index c61f8820e..737f937b5 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -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 diff --git a/.github/workflows/deploy-icons.yml b/.github/workflows/deploy-icons.yml index 9f209e9a0..42fa3be02 100644 --- a/.github/workflows/deploy-icons.yml +++ b/.github/workflows/deploy-icons.yml @@ -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 }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f1ebbd42c..48a0f51ba 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 }} diff --git a/.github/workflows/eslint-annotate.yml b/.github/workflows/eslint-annotate.yml index d6b9d303a..e0cd733b6 100644 --- a/.github/workflows/eslint-annotate.yml +++ b/.github/workflows/eslint-annotate.yml @@ -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://git@github.com/ diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 10fda4a78..5d8fa579b 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 73810130e..cdbfadfb6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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