mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
parent
89bdaa5e46
commit
977683cd5f
@ -106,6 +106,8 @@ inputs:
|
|||||||
outputs:
|
outputs:
|
||||||
volume:
|
volume:
|
||||||
description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'
|
description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'
|
||||||
|
buildVersion:
|
||||||
|
description: 'The generated version used for the Unity build'
|
||||||
branding:
|
branding:
|
||||||
icon: 'box'
|
icon: 'box'
|
||||||
color: 'gray-dark'
|
color: 'gray-dark'
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
|||||||
import { Action, BuildParameters, Cache, Docker, ImageTag, Kubernetes } from './model';
|
import { Action, BuildParameters, Cache, Docker, ImageTag, Kubernetes, Output } from './model';
|
||||||
|
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
|
|
||||||
@ -25,6 +25,9 @@ async function action() {
|
|||||||
});
|
});
|
||||||
await Docker.run(builtImage, { workspace, ...buildParameters });
|
await Docker.run(builtImage, { workspace, ...buildParameters });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set output
|
||||||
|
await Output.setBuildVersion(buildParameters.buildVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
action().catch((error) => {
|
action().catch((error) => {
|
||||||
|
@ -4,6 +4,7 @@ import Cache from './cache';
|
|||||||
import Docker from './docker';
|
import Docker from './docker';
|
||||||
import Input from './input';
|
import Input from './input';
|
||||||
import ImageTag from './image-tag';
|
import ImageTag from './image-tag';
|
||||||
|
import Output from './output';
|
||||||
import Platform from './platform';
|
import Platform from './platform';
|
||||||
import Project from './project';
|
import Project from './project';
|
||||||
import Unity from './unity';
|
import Unity from './unity';
|
||||||
@ -17,6 +18,7 @@ export {
|
|||||||
Docker,
|
Docker,
|
||||||
Input,
|
Input,
|
||||||
ImageTag,
|
ImageTag,
|
||||||
|
Output,
|
||||||
Platform,
|
Platform,
|
||||||
Project,
|
Project,
|
||||||
Unity,
|
Unity,
|
||||||
|
9
src/model/output.js
Normal file
9
src/model/output.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
const core = require('@actions/core');
|
||||||
|
|
||||||
|
class Output {
|
||||||
|
static async setBuildVersion(buildVersion) {
|
||||||
|
await core.setOutput('buildVersion', buildVersion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Output;
|
9
src/model/output.test.js
Normal file
9
src/model/output.test.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import Output from './output';
|
||||||
|
|
||||||
|
describe('Output', () => {
|
||||||
|
describe('setBuildVersion', () => {
|
||||||
|
it('does not throw', async () => {
|
||||||
|
await expect(Output.setBuildVersion('1.0.0')).resolves.not.toThrow();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user