Skip to content

Commit

Permalink
Added input: compression_level (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
sayyid5416 authored Mar 11, 2024
1 parent eb00feb commit cebdc67
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <name-here>`.


Expand All @@ -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 <br>*(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. <br>Range: 0 and 9. <br>_(0 = No compression, 9 = Max compression)_.

<br>

Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit cebdc67

Please sign in to comment.