From dae44244860960992dc7243920e9e983de1f3d6f Mon Sep 17 00:00:00 2001 From: Scott Nath Date: Thu, 11 Apr 2024 11:52:04 -0400 Subject: [PATCH] :rocket: fix github actions `npm ci` --- .github/workflows/astro.yml | 6 ++++-- .github/workflows/release.yml | 22 +++++++++++++++++----- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/astro.yml b/.github/workflows/astro.yml index da0ff7e..7084154 100644 --- a/.github/workflows/astro.yml +++ b/.github/workflows/astro.yml @@ -17,10 +17,12 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup Node.js + - name: Setup Node uses: actions/setup-node@v4 with: - node-version: "lts/*" + node-version: '20' + - name: Latest npm + run: npm install -g npm@latest - name: Cache dependencies uses: actions/cache@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0df80c..6c7c23f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,14 +21,26 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup Node.js + + - name: Setup Node uses: actions/setup-node@v4 with: - node-version: "lts/*" + node-version: '20' + - name: Latest npm + run: npm install -g npm@latest + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Install dependencies - run: npm clean-install - - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies - run: npm audit signatures + run: npm ci + # - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies + # run: npm audit signatures - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}