From cebdc6701d8232c88e86ed63b1eae98bb72db8ef Mon Sep 17 00:00:00 2001 From: Sayyid <78584556+sayyid5416@users.noreply.github.com> Date: Mon, 11 Mar 2024 22:03:59 +0530 Subject: [PATCH] Added input: compression_level (#19) --- README.md | 5 ++++- action.yml | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d8f0daa..c4b1bd9 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ You can also use any major tags like `@v1` for any `@v1.*.*` ### 💠 Executable uploads - You can control if generated executable needs to be uploaded as artifact. - You can choose a name of your liking. + - You can also customise the level of compression for the archive. - Specify the artifact name in `inputs.upload_exe_with_name: `. @@ -67,10 +68,12 @@ You can also use any major tags like `@v1` for any `@v1.*.*` | `options` | - | [Options](#-supported-pyinstaller-options) to set for pyinstaller command | `python_ver` | 3.10 | Specific python version you want to use | `python_arch` | x64 | Specific python architecture you want to use - | `pyinstaller_ver` | - | Specific pyinstaller version you want to use *(with proper signs, like `==5.13.2`)* + | `pyinstaller_ver` | - | Specific pyinstaller version you want to use
*(with proper signs, like `==5.13.2`)* | `exe_path` | ./dist | Path on runner-os, where executable will be stored | `upload_exe_with_name`| - | Upload exe_ artifact with this name. Else, it won't upload + | `upload_exe_with_name`| - | Upload exe_ artifact with this name. Else, it won't upload | `clean_checkout` | true | If true, perform a clean checkout; if false, skip cleaning. Cleaning will remove all existing local files not in the repository during checkout. If you use utilities like pyinstaller-versionfile, set this to false. + | `compression_level` | 6 | Level of compression for archive.
Range: 0 and 9.
_(0 = No compression, 9 = Max compression)_.
diff --git a/action.yml b/action.yml index ccaf35b..799a793 100644 --- a/action.yml +++ b/action.yml @@ -41,6 +41,10 @@ inputs: clean_checkout: description: 'If true, perform a clean checkout; if false, skip cleaning. Cleaning will remove all existing local files not in the repository during checkout. If you use utilities like pyinstaller-versionfile, set this to false.' default: true + compression_level: + description: 'Level of compression for archive (between 0 and 9). 0 = No compression, 9 = Max compression.' + default: 6 + outputs: executable_path: @@ -116,6 +120,7 @@ runs: with: name: ${{ inputs.upload_exe_with_name }} path: ${{ inputs.exe_path }} + compression-level: ${{ inputs.compression_level }} - name: (Upload) generated spec file - if .py if: endsWith(inputs.spec, '.py')