Skip to content

Compile the project #107

Compile the project

Compile the project #107

Workflow file for this run

name: Compile the project
on:
workflow_dispatch:
inputs:
version:
description: 'File version (Without spaces and brackets) (Eg: 1.1.0.0, 1.1.0.0-pre)'
required: true
tagname:
description: 'TagName release (Without spaces and brackets) (Eg: 1.1.0.0-test)'
required: true
release_name:
description: 'Release name'
required: true
jobs:
macOS:
runs-on: macos-latest
steps:
- name: 'Checkout Repo'
uses: actions/checkout@v4
- name: Compile
run: |
wget https://www.python.org/ftp/python/3.13.1/python-3.13.1-macos11.pkg
sudo installer -pkg ./python-3.13.1-macos11.pkg -target /
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python ./get-pip.py
pip install "charset_normalizer<3.0"
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
pyinstaller --onefile --clean --target-arch universal2 main.py
chmod a+x ./dist/main
mv ./dist/main "./ESET-KeyGen_v${{ github.event.inputs.version }}_macos"
- name: Release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
files: |
ESET-KeyGen_v${{ github.event.inputs.version }}_macos
name: ${{ github.event.inputs.release_name }}
tag_name: v${{ github.event.inputs.tagname }}
draft: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
Windows:
runs-on: windows-latest
steps:
- name: 'Checkout Repo'
uses: actions/checkout@v4
- name: Compile (based on Python 3.8.0 x32)
run: |
mkdir legacy
cd legacy
Invoke-WebRequest -Uri "https://github.com/rzc0d3r/ESET-KeyGen/releases/download/python380-portable-win32/python-v3.8.0-portable_win32.zip" -OutFile "python-v3.8.0-portable_win32.zip"
Expand-Archive -Path "python-v3.8.0-portable_win32.zip" -DestinationPath .
.\python.exe -m pip install pyinstaller --no-warn-script-location
.\python.exe -m pip install -r ../requirements.txt --no-warn-script-location
Scripts/pyinstaller.exe --onefile --clean --collect-data selenium_stealth ../main.py
Move-Item -Path .\dist\main.exe -Destination ".\ESET-KeyGen_v${{ github.event.inputs.version }}_win32.exe"
cd ..
- name: Compile (based on Python x64)
run: |
pip install -r requirements.txt
pip install pyinstaller
pyinstaller --onefile --clean --collect-data selenium_stealth main.py
Move-Item -Path .\dist\main.exe -Destination ".\ESET-KeyGen_v${{ github.event.inputs.version }}_win64.exe"
- name: Release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
files: |
legacy/ESET-KeyGen_v${{ github.event.inputs.version }}_win32.exe
ESET-KeyGen_v${{ github.event.inputs.version }}_win64.exe
name: ${{ github.event.inputs.release_name }}
tag_name: v${{ github.event.inputs.tagname }}
draft: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.PAT }}