Skip to content

Upgrade Python Version To 3.10.X #59

Upgrade Python Version To 3.10.X

Upgrade Python Version To 3.10.X #59

Workflow file for this run

name: Build
on:
push:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
createrelease:
name: Create Release
runs-on: [ubuntu-latest]
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Output Release URL File
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
- name: Save Release URL File for publish
uses: actions/upload-artifact@v4
with:
name: release_url
path: release_url.txt
build:
name: Build packages
needs: createrelease
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
TARGET: macos
CMD_BUILD: >
pyinstaller --onefile --console -n JioTV -i resources/JioTV_logo.icns main.py &&
cp -r templates dist &&
cp -r data dist &&
cp -r static dist &&
cd dist/ &&
zip -r9 JioTV_auto_build_MACOS_x86_64 .
OUT_FILE_NAME: JioTV_auto_build_MACOS_x86_64.zip
ASSET_MIME: application/zip
- os: windows-latest
TARGET: windows
CMD_BUILD: >
pyinstaller --onefile --console -n JioTV -i resources\JioTV_logo.ico main.py &&
cp -r templates dist &&
cp -r data dist &&
cp -r static dist &&
cd dist/ &&
powershell Compress-Archive -Path .\* -DestinationPath JioTV_auto_build_WINDOWS_x86_64.zip
OUT_FILE_NAME: JioTV_auto_build_WINDOWS_x86_64.zip
ASSET_MIME: application/zip
- os: ubuntu-latest
TARGET: linux
CMD_BUILD: >
pyinstaller --onefile --console -n JioTV main.py &&
cp -r templates dist &&
cp -r data dist &&
cp -r static dist &&
cd dist/ &&
zip -r9 JioTV_auto_build_LINUX_x86_64 .
OUT_FILE_NAME: JioTV_auto_build_LINUX_x86_64.zip
ASSET_MIME: application/zip
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10.X
uses: actions/setup-python@v5
with:
python-version: 3.10.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build with pyinstaller for ${{matrix.TARGET}}
run: ${{matrix.CMD_BUILD}}
- name: Load Release URL File from release job
uses: actions/download-artifact@v4
with:
name: release_url
- name: Get Release File Name & Upload URL
id: get_release_info
shell: bash
run: |
value=$(cat release_url.txt)
echo "UPLOAD_URL=$value" >> $GITHUB_ENV
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ./dist/${{ matrix.OUT_FILE_NAME}}
asset_name: ${{ matrix.OUT_FILE_NAME}}
asset_content_type: ${{ matrix.ASSET_MIME}}