Skip to content

Commit

Permalink
feat: testing another new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
EwyBoy committed Mar 3, 2024
1 parent 120bee2 commit eece0b3
Showing 1 changed file with 45 additions and 51 deletions.
96 changes: 45 additions & 51 deletions .github/workflows/main.yml
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

0 comments on commit eece0b3

Please sign in to comment.