diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c939c43..9ea98cc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,10 +14,12 @@ jobs: - uses: actions/checkout@v4 with: token: ${{ secrets.GH_TOKEN }} + fetch-depth: 0 # Fetch-depth 0 necessary to get full commit history for checking changes - uses: actions/setup-node@v4 with: - node-version: 20 + node-version-file: '.nvmrc' + cache: 'npm' - name: Configure Git run: | @@ -37,13 +39,7 @@ jobs: echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" > .npmrc echo "@exile-watch:registry=https://npm.pkg.github.com/" >> .npmrc - - name: Check if package-lock.json changed - id: package-lock-changed - run: | - git rev-parse --quiet --verify HEAD^1 && git diff --quiet HEAD^1 HEAD -- package-lock.json - - name: Install dependencies - if: steps.package-lock-changed.outputs.changed == 'true' run: npm ci - if: success() diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2edeafb --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20 \ No newline at end of file