From 7c38d9deae843caf3f0b7247927606c762449f4b Mon Sep 17 00:00:00 2001 From: Jason Luong <jason.luong@snyk.io> Date: Wed, 1 May 2024 13:33:36 +0100 Subject: [PATCH 1/3] chore: use lts node version in CICD jobs --- .github/workflows/test-and-release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index c755650..ba577b7 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -12,15 +12,15 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 18 - name: npm config get cache id: npm-cache-dir run: echo "::set-output name=dir::$(npm config get cache)" - uses: actions/cache@v2 with: path: ${{ steps.npm-cache-dir.outputs.dir }} - key: ${{ runner.os }}-node-14-${{ hashFiles('**/package.json') }} - restore-keys: ${{ runner.os }}-node-14- + key: ${{ runner.os }}-node-18-${{ hashFiles('**/package.json') }} + restore-keys: ${{ runner.os }}-node-18- - run: npm install - run: npm run lint @@ -57,15 +57,15 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 18 - name: npm config get cache id: npm-cache-dir run: echo "::set-output name=dir::$(npm config get cache)" - uses: actions/cache@v2 with: path: ${{ steps.npm-cache-dir.outputs.dir }} - key: ${{ runner.os }}-node-14-${{ hashFiles('**/package.json') }} - restore-keys: ${{ runner.os }}-node-14- + key: ${{ runner.os }}-node-18-${{ hashFiles('**/package.json') }} + restore-keys: ${{ runner.os }}-node-18- - run: npm install - run: npm i -g --save-exact semantic-release@21.0.2 @semantic-release/exec@6.0.3 - run: npx -p node@v18-lts -c "semantic-release" From c57ec45f302d31f754f116fa718c8816f3a31292 Mon Sep 17 00:00:00 2001 From: Jason Luong <jason.luong@snyk.io> Date: Wed, 1 May 2024 13:34:06 +0100 Subject: [PATCH 2/3] chore: run release job on main instead of master --- .github/workflows/test-and-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index ba577b7..26172c4 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -49,7 +49,7 @@ jobs: - run: npm run tap release: - if: github.ref == 'refs/heads/master' # only run on master + if: github.ref == 'refs/heads/main' # only run on main needs: test name: Release snyk-to-html runs-on: ubuntu-latest From ffc18c477259c7973107e4ef25f15bac2fda5fb3 Mon Sep 17 00:00:00 2001 From: Jason Luong <jason.luong@snyk.io> Date: Wed, 1 May 2024 13:34:29 +0100 Subject: [PATCH 3/3] chore: drop CICD tests on EOL node versions --- .github/workflows/test-and-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 26172c4..300d301 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12, 14, 16, 18, 20] + node-version: [18, 20] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }}