Move updates folder on MacOS #80
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, macos-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 (macOS ARM) | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - 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 (MacOS ARM) | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| 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 --windowed --add-data "Icons/AphIcon.png:." --icon="Icons/AphIcon.icns" | |
| - name: Run PyInstaller (MacOS ARM) | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| run: | | |
| pyinstaller PySN.py --windowed --add-data "Icons/AphIcon.png:." --icon="Icons/AphIcon.icns" | |
| - name: Run PyInstaller (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: | | |
| pyinstaller PySN.py -w --add-data "Icons/AphIcon.ico;." --icon="Icons/AphIcon.ico" | |
| - name: Run PyInstaller (Linux) | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: | | |
| pyinstaller PySN.py -w --onefile --add-data "Icons/AphIcon.png:." | |
| - name: Move and Zip (MacOS) | |
| if: ${{ matrix.os == 'macos-15-intel' }} | |
| run: | | |
| mkdir macos | |
| cp -r dist/PySN.app macos | |
| (cd macos/ && zip -r -X ../PySN_MacOS.zip .) | |
| - name: Move and Zip (MacOS ARM) | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| run: | | |
| mkdir macos_ARM | |
| cp -r dist/PySN.app macos_ARM | |
| (cd macos_ARM/ && zip -r -X ../PySN_MacOS_ARM.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 (MacOS ARM) | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: PySN_MacOS_ARM.zip | |
| path: PySN_MacOS_ARM.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_MacOS_ARM.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.6.3 | |
| name: v2.6.3 | |
| body: | | |
| Store updates in the correct place on MacOS. | |
| These were getting shoved into the app's Contents/MacOS folder. Now they should be next to the app. | |
| draft: false | |
| prerelease: false | |
| files: | | |
| ./artifacts/PySN_MacOS.zip | |
| ./artifacts/PySN_MacOS_ARM.zip | |
| ./artifacts/PySN_Windows.zip | |
| ./artifacts/PySN_Linux.zip |