Skip to content

Commit 14266c7

Browse files
.
1 parent 4bb705d commit 14266c7

File tree

5 files changed

+29
-17
lines changed

5 files changed

+29
-17
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ steps:
1717
| ---- | ----------- | -------- |
1818
| `project-path` | The directory that contains the exported visual studio project from Unity. | true |
1919
| `configuration` | The configuration to use when building the visual studio project. | Defaults to `Release`. |
20+
| `architecture` | The architecture to use when building the visual studio project. Can be: `x86`, `x64`, `ARM`, or `ARM64`. | Defaults to `ARM64`. |
2021

2122
### outputs
2223

action.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ inputs:
88
description: The directory that contains the exported visual studio project from Unity.
99
required: true
1010
configuration:
11-
description: The configuration to use when building the visual studio project. Defaults to `Release`.
11+
description: The configuration to use when building the visual studio project. Defaults to `Master`.
1212
required: false
13-
default: 'Release'
13+
default: 'Master'
14+
architecture:
15+
description: 'The architecture to use when building the visual studio project. Can be: `x86`, `x64`, `ARM`, or `ARM64`. Defaults to `ARM64`.'
16+
required: false
17+
default: 'ARM64'
1418
additional-args:
1519
description: Additional arguments to pass to the msbuild command.
1620
required: false

dist/index.js

+11-5
Original file line numberDiff line numberDiff line change
@@ -30564,18 +30564,24 @@ const main = async () => {
3056430564
`/t:Build`,
3056530565
`/p:Configuration=${configuration}`
3056630566
];
30567+
const architecture = core.getInput(`architecture`);
30568+
if (architecture) {
30569+
core.info(`architecture: "${architecture}"`);
30570+
buildArgs.push(`/p:Platform=${architecture}`);
30571+
}
30572+
else {
30573+
buildArgs.push(`/p:Platform=x64|ARM64`);
30574+
}
3056730575
const additionalArgs = core.getInput(`additional-args`);
3056830576
if (additionalArgs) {
30577+
core.info(`additional-args: "${additionalArgs}"`);
3056930578
buildArgs.push(...additionalArgs.split(` `));
3057030579
}
30571-
else {
30572-
buildArgs.push(`/p:AppxBundlePlatforms=x64|ARM64`, `/p:AppxBundle=Always`, `/p:BuildAppxUploadPackageForUap=true`, `/p:UapAppxPackageBuildMode=StoreUpload`);
30573-
}
3057430580
await exec.exec(`msbuild`, [buildPath, ...buildArgs]);
30575-
const exportGlobber = await glob.create(path.join(path.dirname(buildPath), `**/AppPackages/**/*.appx`));
30581+
const exportGlobber = await glob.create(path.join(path.dirname(buildPath), `**/AppPackages/**/*.msix`));
3057630582
const exportFiles = await exportGlobber.glob();
3057730583
if (exportFiles.length === 0) {
30578-
throw new Error(`No appx file found.`);
30584+
throw new Error(`No msix file found.`);
3057930585
}
3058030586
const executable = exportFiles[0];
3058130587
core.info(`executable: "${executable}"`);

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

+10-9
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,22 @@ const main = async () => {
1717
`/t:Build`,
1818
`/p:Configuration=${configuration}`
1919
];
20+
const architecture = core.getInput(`architecture`);
21+
if (architecture) {
22+
core.info(`architecture: "${architecture}"`);
23+
buildArgs.push(`/p:Platform=${architecture}`);
24+
} else {
25+
buildArgs.push(`/p:Platform=x64|ARM64`);
26+
}
2027
const additionalArgs = core.getInput(`additional-args`);
2128
if (additionalArgs) {
29+
core.info(`additional-args: "${additionalArgs}"`);
2230
buildArgs.push(...additionalArgs.split(` `));
23-
} else {
24-
buildArgs.push(
25-
`/p:AppxBundlePlatforms=x64|ARM64`,
26-
`/p:AppxBundle=Always`,
27-
`/p:BuildAppxUploadPackageForUap=true`,
28-
`/p:UapAppxPackageBuildMode=StoreUpload`
29-
);
3031
}
3132
await exec.exec(`msbuild`, [buildPath, ...buildArgs]);
32-
const exportGlobber = await glob.create(path.join(path.dirname(buildPath), `**/AppPackages/**/*.appx`));
33+
const exportGlobber = await glob.create(path.join(path.dirname(buildPath), `**/AppPackages/**/*.msix`));
3334
const exportFiles = await exportGlobber.glob();
34-
if (exportFiles.length === 0) { throw new Error(`No appx file found.`); }
35+
if (exportFiles.length === 0) { throw new Error(`No msix file found.`); }
3536
const executable = exportFiles[0];
3637
core.info(`executable: "${executable}"`);
3738
core.setOutput(`executable`, executable);

0 commit comments

Comments
 (0)