Skip to content

Commit

Permalink
- upgrade to node20 for the GitHub actions
Browse files Browse the repository at this point in the history
- remove node-fetch as it is no longer required with node 20
- upgrade actions to use node20
  • Loading branch information
mikepenz authored Sep 4, 2023
1 parent dc8bed1 commit 512b4d3
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 197 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
"image": "mcr.microsoft.com/devcontainers/typescript-node:16-bullseye",
"image": "mcr.microsoft.com/devcontainers/typescript-node:20-bullseye",
"features": {
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers-contrib/features/typescript:2.0.9": {}
"ghcr.io/devcontainers-contrib/features/typescript:2.0.14": {}
},

// Features to add to the dev container. More info: https://containers.dev/features.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
runs-on: ubuntu-latest

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

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

- name: Build Action
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Install NPM
run: |
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
run: echo "CHANGELOG"

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Build Changelog"
id: github_release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:

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

# Initializes the CodeQL tools for scanning.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
Expand Down
6 changes: 1 addition & 5 deletions __tests__/releaseNotesBuilderPull.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@ import {checkExportedData, mergeConfiguration, resolveConfiguration} from '../sr
import {Octokit} from '@octokit/rest'
import {buildChangelog} from '../src/transform'
import {pullData} from '../src/pr-collector/prCollector'
import fetch from 'node-fetch'
import {Data} from '../src/releaseNotesBuilder'

jest.setTimeout(180000)

// load octokit instance
const enablePullData = false // if false -> use cache for data
const octokit = new Octokit({
auth: `token ${process.env.GITHUB_TOKEN}`,
request: {
fetch: fetch
}
auth: `token ${process.env.GITHUB_TOKEN}`
})

it('Should have empty changelog (tags)', async () => {
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ outputs:
cache:
description: 'Cache containing this runs data. Allows to re-use collected information multiple times to generate different release notes.'
runs:
using: 'node16'
using: 'node20'
main: 'dist/index.js'
25 changes: 11 additions & 14 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 512b4d3

Please sign in to comment.