Skip to content

Commit 0c20554

Browse files
committed
feat: update node version on runner to 20
BREAKING CHANGE: set the default node version to 20
1 parent 7f0c0e4 commit 0c20554

File tree

8 files changed

+4514
-2450
lines changed

8 files changed

+4514
-2450
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Setup Node.js with GitHub Package Registry
4949
uses: actions/setup-node@v3
5050
with:
51-
node-version: 16
51+
node-version: 20
5252
registry-url: 'https://npm.pkg.github.com'
5353
scope: 'cycjimmy'
5454

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ steps:
7575

7676
If no version range is specified with `cycjimmy/semantic-release-action@v3` then [semantic-release](https://github.com/semantic-release/semantic-release/) version [19.0.5](https://github.com/semantic-release/semantic-release/releases/tag/v19.0.5) is used. Earlier versions of `cycjimmy/semantic-release-action` default to using the latest version of [semantic-release](https://github.com/semantic-release/semantic-release/), so in this case it is recommended to specify version 19 or lower to avoid compatibility issues.
7777

78-
*Note: [Version 20.0.0](https://github.com/semantic-release/semantic-release/releases/tag/v20.0.0) of [semantic-release](https://github.com/semantic-release/semantic-release/) and later is currently incompatible with `cycjimmy/semantic-release-action`, since it requires Node.js 18. GitHub does not provide this environment yet for [JavaScript actions](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions).*
79-
8078
#### branches
8179
> {Optional Input Parameter} The branches on which releases should happen.<br>`branches` supports for **semantic-release above v16**.
8280

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ outputs:
5858
last_release_git_tag:
5959
description: 'The Git tag associated with the last release, if there was one.'
6060
runs:
61-
using: 'node16'
61+
using: 'node20'
6262
main: 'index.js'

package-lock.json

Lines changed: 4504 additions & 2442 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"@cycjimmy/awesome-js-funcs": "^4.0.4",
2626
"@semantic-release/changelog": "^6.0.3",
2727
"@semantic-release/git": "^10.0.1",
28-
"semantic-release": "^19.0.5"
28+
"semantic-release": "^21.0.9"
2929
}
3030
}

src/handleOptions.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ exports.handleBranchesOption = () => {
4747
*/
4848
exports.handleDryRunOption = () => {
4949
const dryRun = core.getInput(inputs.dry_run);
50+
core.debug(`dryRun input: ${dryRun}`);
5051

5152
switch (dryRun) {
5253
case 'true':
@@ -66,6 +67,7 @@ exports.handleDryRunOption = () => {
6667
*/
6768
exports.handleCiOption = () => {
6869
const ci = core.getInput(inputs.ci);
70+
core.debug(`ci input: ${ci}`);
6971

7072
switch (ci) {
7173
case 'true':
@@ -85,6 +87,7 @@ exports.handleCiOption = () => {
8587
*/
8688
exports.handleExtends = () => {
8789
const extend = core.getInput(inputs.extends);
90+
core.debug(`extend input: ${extend}`);
8891

8992
if (extend) {
9093
const extendModuleNames = extend.split(/\r?\n/)
@@ -103,6 +106,7 @@ exports.handleExtends = () => {
103106
*/
104107
exports.handleTagFormat = () => {
105108
const tagFormat = core.getInput(inputs.tag_format);
109+
core.debug(`citagFormat input: ${tagFormat}`);
106110

107111
if (tagFormat) {
108112
return {

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ const release = async () => {
2626
await preInstall(core.getInput(inputs.extra_plugins));
2727
await preInstall(core.getInput(inputs.extends));
2828

29-
const semanticRelease = require('semantic-release');
30-
const result = await semanticRelease({
29+
const semanticRelease = await import('semantic-release');
30+
const result = await semanticRelease.default({
3131
...handleBranchesOption(),
3232
...handleDryRunOption(),
3333
...handleCiOption(),

src/windUpJob.task.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = async (result) => {
1212
return Promise.resolve();
1313
}
1414

15-
const {lastRelease, commits, nextRelease, releases} = result;
15+
const {lastRelease, commits, nextRelease, releases} = await result;
1616

1717
if (lastRelease.version) {
1818
core.debug(`The last release was "${lastRelease.version}".`);

0 commit comments

Comments
 (0)