-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
45 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,50 @@ | ||
name: Build with PyInstaller | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: Build on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
python-version: [3.11] # You can change the Python version as needed | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt # Modify this command as per your requirements | ||
- name: Build with PyInstaller | ||
run: | | ||
pyinstaller --onefile --name counter_phisher --icon assets/images/fish.ico counter_phisher.py | ||
# Adjusted for different operating systems | ||
if ($env:GITHUB_RUNNER_OS -eq "Windows") | ||
{ | ||
mv dist\counter_phisher.exe dist\counter_phisher_windows.exe | ||
} | ||
elseif ($env:GITHUB_RUNNER_OS -eq "macOS") | ||
{ | ||
mv dist/counter_phisher dist/counter_phisher_mac | ||
} | ||
else | ||
{ | ||
mv dist/counter_phisher dist/counter_phisher_linux | ||
} | ||
- name: Archive artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: counter_phisher | ||
path: dist/counter_phisher* # Adjusted to include files with extensions | ||
build: | ||
name: Build on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ windows-latest, macos-latest, ubuntu-latest ] | ||
python-version: [ 3.11 ] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Build with PyInstaller | ||
run: | | ||
if [ ${{ matrix.os }} == 'windows-latest' ]; then | ||
pyinstaller --onefile --name counter_phisher.exe counter_phisher.py | ||
elif [ ${{ matrix.os }} == 'macos-latest' ]; then | ||
pyinstaller --onefile --name counter_phisher.app counter_phisher.py | ||
elif [ ${{ matrix.os }} == 'ubuntu-latest' ]; then | ||
pyinstaller --onefile --name counter_phisher counter_phisher.py | ||
else | ||
echo "Unsupported OS" | ||
exit 1 | ||
fi | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: counter_phisher | ||
path: dist/counter_phisher |