-
Notifications
You must be signed in to change notification settings - Fork 811
106 lines (99 loc) · 3.84 KB
/
compile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
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_Intel:
runs-on: macos-13
steps:
- name: 'Checkout Repo'
uses: actions/checkout@v4
- name: Compile
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
pyinstaller --onefile --clean main.py
chmod a+x ./dist/main
mv ./dist/main "./ESET-KeyGen_v${{ github.event.inputs.version }}_macos_amd64"
- name: Release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
files: |
ESET-KeyGen_v${{ github.event.inputs.version }}_macos_amd64
name: ${{ github.event.inputs.release_name }}
tag_name: v${{ github.event.inputs.tagname }}
draft: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
macOS_Arm:
runs-on: macos-latest
steps:
- name: 'Checkout Repo'
uses: actions/checkout@v4
- name: Compile
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
pyinstaller --onefile --clean main.py
chmod a+x ./dist/main
mv ./dist/main "./ESET-KeyGen_v${{ github.event.inputs.version }}_macos_arm64"
- name: Release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
files: |
ESET-KeyGen_v${{ github.event.inputs.version }}_macos_arm64
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 }}