Create Linux release #71
Workflow file for this run
This file contains hidden or 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
| name: Build Workflow | |
| on: | |
| pull_request: | |
| types: [closed] | |
| jobs: | |
| build_matrix: | |
| strategy: | |
| matrix: | |
| 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@v4 | |
| - name: Install Python (MacOS) | |
| if: ${{ matrix.os == 'macos-15-intel' }} | |
| run: | | |
| wget https://www.python.org/ftp/python/3.10.6/python-3.10.6-macos11.pkg | |
| sudo installer -verbose -pkg ./python-3.10.6-macos11.pkg -target / | |
| echo "/Library/Frameworks/Python.framework/Versions/3.10/bin" >> $GITHUB_PATH | |
| - name: Install Python (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| 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: | | |
| pip3 install -r requirements.txt | |
| - name: Install Requirements (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| 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: | | |
| pyinstaller PySN.py -w --onefile | |
| - name: Run PyInstaller (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| 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: | | |
| mkdir macos | |
| cp dist/PySN macos | |
| (cd macos/ && zip -r -X ../PySN_MacOS.zip .) | |
| - name: Move and Zip (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: | | |
| mkdir windows | |
| 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 | |
| with: | |
| name: PySN_MacOS.zip | |
| path: PySN_MacOS.zip | |
| - name: Upload Artifact (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| 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@v4 | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: PySN_MacOS.zip | |
| path: ./artifacts | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| 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: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: v2.5.5 | |
| name: v2.5.5 | |
| body: | | |
| Create Linux release. | |
| draft: false | |
| prerelease: false | |
| files: | | |
| ./artifacts/PySN_MacOS.zip | |
| ./artifacts/PySN_Windows.zip | |
| ./artifacts/PySN_Linux.zip |