Skip to content

Commit

Permalink
chore: update CICD to use node20
Browse files Browse the repository at this point in the history
  • Loading branch information
j-luong committed May 1, 2024
1 parent 848b0d3 commit 9faffad
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: npm config get cache
id: npm-cache-dir
run: echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-18-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-node-18-
key: ${{ runner.os }}-node-20-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-node-20-
- run: npm install
- run: npm run lint

Expand All @@ -32,15 +32,15 @@ jobs:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm config get cache
id: npm-cache-dir
run: echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }}
Expand All @@ -54,21 +54,21 @@ jobs:
name: Release snyk-to-html
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: npm config get cache
id: npm-cache-dir
run: echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-18-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-node-18-
key: ${{ runner.os }}-node-20-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-node-20-
- run: npm install
- run: npm i -g --save-exact [email protected] @semantic-release/[email protected]
- run: npx -p node@v18-lts -c "semantic-release"
- run: semantic-release --branches main
env:
PUBLIC_S3_BUCKET: ${{secrets.PUBLIC_S3_BUCKET}}
AWS_DEFAULT_REGION: ${{secrets.AWS_DEFAULT_REGION}}
Expand Down

0 comments on commit 9faffad

Please sign in to comment.