From 464750e5be71e74a2598d25bc5ab88edaf8cb95c Mon Sep 17 00:00:00 2001 From: "@zimeg" Date: Fri, 1 Nov 2024 16:25:50 -0700 Subject: [PATCH] ci(fix): set the node version to the version saved in project --- .github/workflows/publish.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 11a53e6..f330045 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,13 +8,26 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout + - name: Checkout the current code uses: actions/checkout@v4 with: ref: ${{ github.event.release.tag_name }} - - name: Install deps and build - run: npm ci && npm run build - - uses: teunmooij/github-versioned-release@v1.2.1 + + - name: Configure the runtime node + uses: actions/setup-node@v4 + with: + cache: npm + cache-dependency-path: package-lock.json + node-version-file: .nvmrc + + - name: Install project dependencies + run: npm ci + + - name: Build a production release + run: npm run build + + - name: Distribute the latest tagged release + uses: teunmooij/github-versioned-release@v1.2.1 with: exclude: LICENSE template: javascript-action