Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 49 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
build_matrix:
strategy:
matrix:
os: [windows-latest, macos-15-intel]
os: [windows-latest, macos-15-intel, ubuntu-latest]

if: github.event.pull_request.merged == true
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Python (MacOS)
if: ${{ matrix.os == 'macos-15-intel' }}
Expand All @@ -25,11 +25,18 @@ jobs:

- name: Install Python (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'

- name: Install Python (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'

- name: Install Requirements (MacOS)
if: ${{ matrix.os == 'macos-15-intel' }}
run: |
Expand All @@ -40,6 +47,11 @@ jobs:
run: |
pip install -r requirements.txt

- name: Install Requirements (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
pip install -r requirements.txt

- name: Run PyInstaller (MacOS)
if: ${{ matrix.os == 'macos-15-intel' }}
run: |
Expand All @@ -50,6 +62,11 @@ jobs:
run: |
pyinstaller PySN.py -w --add-data "AphIcon.ico;." --icon="AphIcon.ico"

- name: Run PyInstaller (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
pyinstaller PySN.py -w --onefile

- name: Move and Zip (MacOS)
if: ${{ matrix.os == 'macos-15-intel' }}
run: |
Expand All @@ -64,6 +81,13 @@ jobs:
cp -r dist/* windows
Compress-Archive -Path "windows/*" -DestinationPath PySN_Windows.zip

- name: Move and Zip (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
mkdir linux
cp dist/PySN linux
(cd linux/ && zip -r -X ../PySN_Linux.zip .)

- name: Upload Artifact (MacOS)
if: ${{ matrix.os == 'macos-15-intel' }}
uses: actions/upload-artifact@v4
Expand All @@ -78,12 +102,19 @@ jobs:
name: PySN_Windows.zip
path: PySN_Windows.zip

- name: Upload Artifact (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v4
with:
name: PySN_Linux.zip
path: PySN_Linux.zip

create_release:
needs: build_matrix
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download Artifacts
uses: actions/download-artifact@v4
Expand All @@ -97,35 +128,25 @@ jobs:
name: PySN_Windows.zip
path: ./artifacts

- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: PySN_Linux.zip
path: ./artifacts

- name: Create Release
id: create_release
uses: actions/create-release@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v2.5.4
release_name: v2.5.4
tag_name: v2.5.5
name: v2.5.5
body: |
Stop downloads and reset progress bar when the clear list button is pressed.
Create Linux release.
draft: false
prerelease: false

- name: Upload Release Asset (Windows)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/PySN_Windows.zip
asset_name: PySN_Windows.zip
asset_content_type: application/zip

- name: Upload Release Asset (MacOS)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/PySN_MacOS.zip
asset_name: PySN_MacOS.zip
asset_content_type: application/zip
files: |
./artifacts/PySN_MacOS.zip
./artifacts/PySN_Windows.zip
./artifacts/PySN_Linux.zip
Loading