Skip to content

Commit

Permalink
Update to Node 20 (#170)
Browse files Browse the repository at this point in the history
- Change action to run with Node20 runtime
- Use Node20 compatible actions in all workflows
- Update NPM dependencies for Node 20 compatibility

Thanks to @deejay1 for getting this started!
  • Loading branch information
bigdaz authored Jan 29, 2024
2 parents c8fad9e + d8758a9 commit 27152f6
Show file tree
Hide file tree
Showing 8 changed files with 27,331 additions and 9,782 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set Node.js 16.x
uses: actions/setup-node@v3.7.0
- name: Set Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 16.x

node-version: 20.x
cache: npm

- name: Validate package-lock
run: npx lockfile-lint --path package-lock.json --allowed-hosts npm yarn --validate-https

Expand All @@ -47,7 +48,7 @@ jobs:
id: diff

# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node.js 16.x
uses: actions/setup-node@v3.7.0
- uses: actions/checkout@v4
- name: Set Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
cache: npm
- run: |
npm -v
node -v
Expand All @@ -23,7 +24,7 @@ jobs:
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
# to allow the invalid wrapper jar present in test data
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -39,7 +39,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -53,4 +53,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Configuration file for asdf version manager
nodejs 20.10.0
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ outputs:
description: The path of the Gradle Wrapper(s) JAR that failed validation.

runs:
using: 'node16'
using: 'node20'
main: 'dist/index.js'

branding:
Expand Down
Loading

0 comments on commit 27152f6

Please sign in to comment.