diff --git a/README.md b/README.md index 03cdd9f7..ac53febf 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ Since this action creates releases and uploads the zip file assets, you will nee - Enable release creation. If `false`, exports will be available in folder `exports` in `relative_project_path`. - `generate_release_notes` default `false` - Enable auto-generation of release notes based on commit history. +- `zip_export` default `true` + - If `create_release` is `false`, this input determines whether the binaries are zipped when moved to the `exports` directory in `relative_project_path`. If `true`, the binaries are zipped. If `false`, the subdirectories containing the binaries are moved into the `exports` directory. ### Example Workflow Configuration Below is a sample workflow configuration file utilizing this action. This example workflow would be defined in `.github/workflows/main.yml`. For more information about defining workflows [check out the workflow docs](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow). diff --git a/package.json b/package.json index a298a3ea..c2b6e858 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Exports Godot games.", "main": "lib/main.js", "scripts": { - "build": "ncc build ./src/main.ts -o dist", + "build": "yarn lint && ncc build ./src/main.ts -o dist", "test": "echo \"Error: no test specified\" && exit 1", "lint": "eslint . --ext .ts" }, diff --git a/src/godot.ts b/src/godot.ts index 98b28c04..04e08a74 100644 --- a/src/godot.ts +++ b/src/godot.ts @@ -197,8 +197,7 @@ async function moveExports(exportResults: ExportResult[]): Promise { for (const exportResult of exportResults) { if (shouldZipExport) { promises.push(move(await zip(exportResult))); - } - else { + } else { promises.push(moveDirectory(exportResult.buildDirectory)); } } diff --git a/src/main.ts b/src/main.ts index bd68ef99..5a37fec7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -124,4 +124,11 @@ function logAndExit(error: Error): void { main().catch(logAndExit); -export { actionWorkingPath, relativeProjectPath, relativeProjectExportsPath, getGitHubClient, getLatestReleaseTagName, shouldZipExport }; +export { + actionWorkingPath, + relativeProjectPath, + relativeProjectExportsPath, + getGitHubClient, + getLatestReleaseTagName, + shouldZipExport, +};