Skip to content

Commit c454a35

Browse files
committed
wip(node-version): passed the node version to the release workflow lifter
1 parent 46be844 commit c454a35

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import lift from './lifter';
1313
suite('github-workflows lifter for semantic-release', () => {
1414
let sandbox;
1515
const projectRoot = any.string();
16+
const nodeVersion = any.string();
1617
const workflowsDirectory = `${projectRoot}/.github/workflows`;
1718
const verificationWorkflowContents = any.string();
1819
const parsedVerificationWorkflowContents = any.simpleObject();
@@ -56,9 +57,9 @@ suite('github-workflows lifter for semantic-release', () => {
5657
jobs: existingJobs
5758
});
5859

59-
await lift({projectRoot});
60+
await lift({projectRoot, nodeVersion});
6061

61-
assert.calledWith(releaseWorkflowLifter.default, {projectRoot});
62+
assert.calledWith(releaseWorkflowLifter.default, {projectRoot, nodeVersion});
6263
assert.calledWith(
6364
core.writeConfigFile,
6465
{
@@ -86,9 +87,9 @@ suite('github-workflows lifter for semantic-release', () => {
8687
jobs: existingJobs
8788
});
8889

89-
await lift({projectRoot});
90+
await lift({projectRoot, nodeVersion});
9091

91-
assert.calledWith(releaseWorkflowLifter.default, {projectRoot});
92+
assert.calledWith(releaseWorkflowLifter.default, {projectRoot, nodeVersion});
9293
assert.calledWith(
9394
core.writeConfigFile,
9495
{

src/semantic-release/ci-providers/github-workflows/lifter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ function removeCycjimmyActionFrom(otherJobs) {
1515
]));
1616
}
1717

18-
export default async function ({projectRoot}) {
18+
export default async function ({projectRoot, nodeVersion}) {
1919
const workflowsDirectory = `${projectRoot}/.github/workflows`;
2020

21-
await liftReleaseWorkflow({projectRoot});
21+
await liftReleaseWorkflow({projectRoot, nodeVersion});
2222

2323
const parsedVerificationWorkflowDetails = load(await fs.readFile(`${workflowsDirectory}/node-ci.yml`, 'utf-8'));
2424

0 commit comments

Comments
 (0)