Skip to content

dependency updates and stuff, no features added #63

dependency updates and stuff, no features added

dependency updates and stuff, no features added #63

Workflow file for this run

name: Build and Package App
on:
push:
branches:
- main
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Check OpenSSL Version
run: python -c "import ssl; print(ssl.OPENSSL_VERSION)"
- name: Install VLC
run: sudo apt-get update && sudo apt-get install -y vlc
- name: Install dependencies
run: pip install -r requirements.txt
- name: Package App with PyInstaller for Linux
run: |
pip install pyinstaller
pyinstaller qitv-linux.spec
- name: Upload Linux artifact
uses: actions/upload-artifact@v3
with:
name: packaged-app-linux
path: dist/qitv
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Check OpenSSL Version
run: python -c "import ssl; print(ssl.OPENSSL_VERSION)"
# - name: Install VLC
# run: choco install vlc -y
- name: Install VLC
shell: pwsh
run: |
$vlcURL = "https://download.videolan.org/pub/videolan/vlc/last/win64/"
$getHTML = Invoke-WebRequest -Uri $vlcURL
$name = ($getHTML.Links | Where-Object { $_.href -match 'vlc-.*\.exe$' }).href
if ($name) {
$vlcURL = "$vlcURL$name"
Write-Output "Downloading VLC from $vlcURL"
$outPath = "$env:GITHUB_WORKSPACE\temp"
$outFile = "$outPath\vlc64.exe"
mkdir $outPath -Force
(New-Object System.Net.WebClient).DownloadFile($vlcURL, $outFile)
Start-Process -FilePath $outFile -ArgumentList "/S" -Wait
Remove-Item $outFile
}
else {
Write-Error "VLC executable not found."
exit 1
}
- name: Install dependencies
run: pip install -r requirements.txt
- name: Package App with PyInstaller for Windows
run: |
pip install pyinstaller
pyinstaller qitv-windows.spec
- name: Upload Windows artifact
uses: actions/upload-artifact@v3
with:
name: packaged-app-windows
path: dist/qitv.exe
build-macos-universal:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Check OpenSSL Version
run: python -c "import ssl; print(ssl.OPENSSL_VERSION)"
- name: Install VLC
run: brew install --cask vlc
- name: Install dependencies
run: pip install -r requirements.txt
- name: Package App with PyInstaller for macOS
run: |
pip install pyinstaller
pyinstaller qitv-macos.spec
# - name: Rename the executable
# run: mv dist/qitv.app/Contents/MacOS/qitv dist/qitv.app/Contents/MacOS/qitv_cli
# - name: Create launcher script
# run: |
# printf '#!/bin/bash\nopen -n "$(dirname "$0")/qitv_cli"\n' > dist/qitv.app/Contents/MacOS/qitv
# chmod +x dist/qitv.app/Contents/MacOS/qitv
- name: Ad-Hoc Sign the app
run: codesign --force --deep --sign - dist/qitv.app
- name: Zip macOS App
run: |
cd dist
zip -r qitv-macos-universal.zip qitv.app
- name: Upload macOS artifact
uses: actions/upload-artifact@v3
with:
name: packaged-app-macos-universal
path: dist/qitv-macos-universal.zip
build-macos-intel:
runs-on: macos-11
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Check OpenSSL Version
run: python -c "import ssl; print(ssl.OPENSSL_VERSION)"
- name: Install VLC
run: brew install --cask vlc
- name: Install dependencies
run: pip install -r requirements.txt
- name: Package App with PyInstaller for macOS (Intel)
run: |
pip install pyinstaller
pyinstaller qitv-macos.spec
# - name: Rename the executable
# run: mv dist/qitv.app/Contents/MacOS/qitv dist/qitv.app/Contents/MacOS/qitv_cli
# - name: Create launcher script
# run: |
# printf '#!/bin/bash\nopen -n "$(dirname "$0")/qitv_cli"\n' > dist/qitv.app/Contents/MacOS/qitv
# chmod +x dist/qitv.app/Contents/MacOS/qitv
- name: Ad-Hoc Sign the app
run: codesign --force --deep --sign - dist/qitv.app
- name: Zip macOS App
run: |
cd dist
zip -r qitv-macos-intel.zip qitv.app
- name: Upload macOS artifact
uses: actions/upload-artifact@v3
with:
name: packaged-app-macos-intel
path: dist/qitv-macos-intel.zip
release:
needs: [build-linux, build-windows, build-macos-universal, build-macos-intel]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get Version
id: get_version
run: |
version=$(grep -oP '(?<=CURRENT_VERSION = ")[^"]*' config_manager.py)
echo "VERSION=$version" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
tag_name: v${{ env.VERSION }}
release_name: v${{ env.VERSION }}
draft: false
prerelease: true
- name: Download all artifacts
uses: actions/download-artifact@v3
- name: Upload Linux Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: packaged-app-linux/qitv
asset_name: qitv-linux
asset_content_type: application/octet-stream
- name: Upload Windows Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: packaged-app-windows/qitv.exe
asset_name: qitv-windows.exe
asset_content_type: application/octet-stream
- name: Upload macOS Universal Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: packaged-app-macos-universal/qitv-macos-universal.zip
asset_name: qitv-macos-universal.zip
asset_content_type: application/zip
- name: Upload macOS Intel Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: packaged-app-macos-intel/qitv-macos-intel.zip
asset_name: qitv-macos-intel.zip
asset_content_type: application/zip