Skip to content

Commit 0f25fdc

Browse files
committed
feat(release-workflow-version): use semantic-release v22 for node version less than v20
1 parent f3effd3 commit 0f25fdc

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export function determineAppropriateWorkflow(nodeVersion) {
22
if (18 > nodeVersion) return 'form8ion/.github/.github/workflows/release-package-semantic-release-19.yml@master';
3+
if (20 > nodeVersion) return 'form8ion/.github/.github/workflows/release-package-semantic-release-22.yml@master';
34

45
return 'form8ion/.github/.github/workflows/release-package.yml@master';
56
}

src/semantic-release/ci-providers/github-workflows/reusable-release-workflow.test.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@ import {determineAppropriateWorkflow} from './reusable-release-workflow.js';
55

66
describe('reusable release workflow', () => {
77
it('should use the latest semantic-release version for the lowest supported node version', async () => {
8-
expect(determineAppropriateWorkflow('18')).toEqual('form8ion/.github/.github/workflows/release-package.yml@master');
8+
expect(determineAppropriateWorkflow('20')).toEqual('form8ion/.github/.github/workflows/release-package.yml@master');
99
});
1010

1111
it('should use the latest semantic-release version for a higher node version', async () => {
12-
expect(determineAppropriateWorkflow('20')).toEqual('form8ion/.github/.github/workflows/release-package.yml@master');
12+
expect(determineAppropriateWorkflow('22')).toEqual('form8ion/.github/.github/workflows/release-package.yml@master');
13+
});
14+
15+
it('should use semantic-release v18 for lower than node v20', async () => {
16+
expect(determineAppropriateWorkflow(any.fromList(['18', '19'])))
17+
.toEqual('form8ion/.github/.github/workflows/release-package-semantic-release-22.yml@master');
1318
});
1419

1520
it('should use semantic-release v19 for a lower node version', async () => {

test/integration/features/step_definitions/common-steps.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ When('the project is lifted', async function () {
9292
}
9393
},
9494
node_modules: stubbedNodeModules,
95-
'.nvmrc': `${this.projectNodeVersion || 18}`,
95+
'.nvmrc': `${this.projectNodeVersion || 20}`,
9696
'package.json': JSON.stringify({
9797
...any.simpleObject(),
9898
...this.semanticReleaseConfigured && {version: '0.0.0-semantically-released'}

0 commit comments

Comments
 (0)