From b90307b984f64d3967e6203109272d361ef0975d Mon Sep 17 00:00:00 2001 From: "Paul B." Date: Tue, 17 Dec 2024 14:58:24 +0100 Subject: [PATCH] node: use node20 and specificy it as minimum node engine --- .github/workflows/test.yml | 15 +++++++++++---- .node-version | 1 + action.yml | 8 ++++++-- package-lock.json | 2 +- package.json | 5 ++--- 5 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 .node-version diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3aaba731..74960862 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,20 +12,27 @@ jobs: strategy: fail-fast: false matrix: - node_version: [ '14', '16', '18' ] + node_version: [ '20', '23', 'latest' ] name: Node ${{ matrix.node_version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - name: Setup Node.js + id: setup-node + uses: actions/setup-node@v4 + with: + node-version-file: .node-version + cache: npm - run: | - npm install + npm ci - run: | npm run format-check - run: | npm run all + 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: file: examples/gitlab.yml diff --git a/.node-version b/.node-version new file mode 100644 index 00000000..f812e459 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +20.18.1 \ No newline at end of file diff --git a/action.yml b/action.yml index 09ef221a..6de19478 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,8 @@ name: "Bump.sh API Documentation & Changelog" description: | Keep your public, private and partner API docs in sync with your code, whether you use OpenAPI or AsyncAPI. +author: bump.sh + inputs: file: description: "Relative path to an API definition file (OpenAPI or AsyncAPI)" @@ -22,9 +24,11 @@ inputs: fail_on_breaking: description: "Mark the action as failed when a breaking change is detected with the diff command. This is only valid when `diff` is provided in the command input." default: false + runs: - using: "node16" - main: "dist/index.js" + using: node20 + main: dist/index.js + branding: color: gray-dark icon: book-open diff --git a/package-lock.json b/package-lock.json index 134289c9..ce85fec1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "typescript": "^4.4.4" }, "engines": { - "node": ">=16.0.0" + "node": ">=20.0.0" } }, "node_modules/@actions/core": { diff --git a/package.json b/package.json index 698d1a29..865d8c71 100644 --- a/package.json +++ b/package.json @@ -6,17 +6,16 @@ "bugs": "https://github.com/bump-sh/github-action/issues", "homepage": "https://bump.sh", "engines": { - "node": ">=16.0.0" + "node": ">=20.0.0" }, "scripts": { "build": "tsc -b", "clean": "rm -rf dist/", "format": "eslint . --ext .ts --config .eslintrc --fix", "format-check": "eslint . --ext .ts --config .eslintrc", - "lint": "eslint src/**/*.ts", "package": "ncc build --source-map --license licenses.txt -e typescript", "test": "jest", - "all": "npm run build && npm run format && npm run lint && npm run package && npm test" + "all": "npm run build && npm run format && npm run package && npm test" }, "repository": "bump-sh/github-action", "keywords": [