Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ inputs:
description: 'The android versionCode'
androidAppBundle:
required: false
default: false
default: 'false'
description: 'Whether to build .aab instead of .apk'
androidKeystoreName:
required: false
Expand Down
2 changes: 1 addition & 1 deletion action/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG IMAGE
FROM $IMAGE
FROM registry.gitlab.com/szymonkaz/unity3d:2019.3.12f1-android-szymon-kaz-fixfailingandroidgithubactions

LABEL "com.github.actions.name"="Unity - Builder"
LABEL "com.github.actions.description"="Build Unity projects for different platforms."
Expand Down
2 changes: 1 addition & 1 deletion action/index.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/model/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class Input {
}

static get androidAppBundle() {
const input = core.getInput('androidAppBundle') || 'false';
const input = core.getInput('androidAppBundle') || false;

return input === 'true' ? 'true' : 'false';
return input === 'true';
}

static get androidKeystoreName() {
Expand All @@ -72,9 +72,9 @@ class Input {
}

static get allowDirtyBuild() {
const input = core.getInput('allowDirtyBuild') || 'false';
const input = core.getInput('allowDirtyBuild') || false;

return input === 'true' ? 'true' : 'false';
return input === 'true';
}

static get customParameters() {
Expand Down
12 changes: 6 additions & 6 deletions src/model/input.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,18 @@ describe('Input', () => {

describe('androidAppBundle', () => {
it('returns the default value', () => {
expect(Input.androidAppBundle).toStrictEqual('false');
expect(Input.androidAppBundle).toStrictEqual(false);
});

it('returns true when string true is passed', () => {
const spy = jest.spyOn(core, 'getInput').mockReturnValue('true');
expect(Input.androidAppBundle).toStrictEqual('true');
expect(Input.androidAppBundle).toStrictEqual(true);
expect(spy).toHaveBeenCalledTimes(1);
});

it('returns false when string false is passed', () => {
const spy = jest.spyOn(core, 'getInput').mockReturnValue('false');
expect(Input.androidAppBundle).toStrictEqual('false');
expect(Input.androidAppBundle).toStrictEqual(false);
expect(spy).toHaveBeenCalledTimes(1);
});
});
Expand Down Expand Up @@ -216,18 +216,18 @@ describe('Input', () => {

describe('allowDirtyBuild', () => {
it('returns the default value', () => {
expect(Input.allowDirtyBuild).toStrictEqual('false');
expect(Input.allowDirtyBuild).toStrictEqual(false);
});

it('returns true when string true is passed', () => {
const spy = jest.spyOn(core, 'getInput').mockReturnValue('true');
expect(Input.allowDirtyBuild).toStrictEqual('true');
expect(Input.allowDirtyBuild).toStrictEqual(true);
expect(spy).toHaveBeenCalledTimes(1);
});

it('returns false when string false is passed', () => {
const spy = jest.spyOn(core, 'getInput').mockReturnValue('false');
expect(Input.allowDirtyBuild).toStrictEqual('false');
expect(Input.allowDirtyBuild).toStrictEqual(false);
expect(spy).toHaveBeenCalledTimes(1);
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/model/versioning.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class Versioning {
}

static get isDirtyAllowed() {
return Input.allowDirtyBuild === 'true';
return Input.allowDirtyBuild;
}

static get strategies() {
Expand Down