Skip to content

Compile the project #151

Compile the project

Compile the project #151

Workflow file for this run

name: Compile the project
on:
workflow_dispatch:
inputs:
version:
description: 'File version (e.g. 1.1.0.0)'
required: true
tagname:
description: 'Tag name (e.g. 1.1.0.0-test)'
required: true
release_name:
description: 'Release name'
required: true
jobs:
macOS:
runs-on: macos-latest
outputs:
artifact_mac: ${{ steps.upload.outputs.artifact_mac }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Compile
run: |
python -m pip install --upgrade pip
python -m pip install charset_normalizer pyinstaller -r requirements.txt
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: Upload macOS artifact
uses: actions/upload-artifact@v4
with:
name: macos-artifact
path: ./ESET-KeyGen_v${{ github.event.inputs.version }}_macos
windows:
runs-on: windows-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Download DLL patch
run: |
Invoke-WebRequest -Uri "https://github.com/nalexandru/api-ms-win-core-path-HACK/releases/download/0.3.1/api-ms-win-core-path-blender-0.3.1.zip" -OutFile dlls.zip
Expand-Archive -Path dlls.zip -DestinationPath dll_patch
- name: Compile win32
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-portable.zip"
Expand-Archive -Path "python-portable.zip" -DestinationPath .
.\python.exe -m pip install --upgrade pip --no-warn-script-location
.\python.exe -m pip install pyinstaller -r ../requirements.txt --no-warn-script-location
Scripts\pyinstaller.exe --onefile --collect-data selenium_stealth --add-data ..\dll_patch\api-ms-win-core-path-blender\x86\api-ms-win-core-path-l1-1-0.dll:. ../main.py
Move-Item -Path .\dist\main.exe -Destination "../ESET-KeyGen_v${{ github.event.inputs.version }}_win32.exe"
- name: Compile win64
run: |
pip install --upgrade pip
pip install pyinstaller -r requirements.txt
pyinstaller -onefile --collect-data selenium_stealth --add-data dll_patch\api-ms-win-core-path-blender\x64\api-ms-win-core-path-l1-1-0.dll:. ../main.py
Move-Item -Path .\dist\main.exe -Destination "ESET-KeyGen_v${{ github.event.inputs.version }}_win64.exe"
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: windows-artifacts
path: |
ESET-KeyGen_v${{ github.event.inputs.version }}_win32.exe
ESET-KeyGen_v${{ github.event.inputs.version }}_win64.exe
release:
needs: [macOS, windows]
runs-on: ubuntu-latest
steps:
- name: Download macOS artifact
uses: actions/download-artifact@v4
with:
name: macos-artifact
- name: Download Windows artifacts
uses: actions/download-artifact@v4
with:
name: windows-artifacts
- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v2
with:
name: ${{ github.event.inputs.release_name }}
tag_name: v${{ github.event.inputs.tagname }}
draft: false
generate_release_notes: true
files: |
ESET-KeyGen_v${{ github.event.inputs.version }}_macos
ESET-KeyGen_v${{ github.event.inputs.version }}_win32.exe
ESET-KeyGen_v${{ github.event.inputs.version }}_win64.exe
env:
GITHUB_TOKEN: ${{ secrets.PAT }}