Added Workflow for specific branches. #1
Workflow file for this run
This file contains 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: Pre-Release on Push | |
on: | |
push: | |
branches: | |
- "dev" | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macos-latest | |
TARGET: macos | |
CMD_BUILD: > | |
nuitka --onefile main.py --output-dir=output --output-filename="JioTV" --remove-output --disable-ccache && | |
cp -r templates output && | |
cp -r data output && | |
cp -r static output && | |
cd output/ && | |
zip -r9 JioTV_auto_build_MACOS_x86_64 . | |
OUT_FILE_NAME: JioTV_auto_build_MACOS_x86_64.zip | |
- os: windows-latest | |
TARGET: windows | |
CMD_BUILD: > | |
nuitka --windows-icon-from-ico=resources\JioTV_logo.ico --onefile main.py --output-dir=output --output-filename="JioTV.exe" --remove-output --disable-ccache --follow-imports --assume-yes-for-downloads && | |
cp -r templates output && | |
cp -r data output && | |
cp -r static output && | |
cd output/ && | |
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: > | |
nuitka --onefile main.py --output-dir=output --output-filename="JioTV" --remove-output --disable-ccache && | |
cp -r templates output && | |
cp -r data output && | |
cp -r static output && | |
cd output/ && | |
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 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- 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: Generate tag | |
id: gen_tag | |
run: | | |
echo "tag=${{ github.ref_name }}.$(date +'%Y.%m.%d.%H.%M.%s')" >> $GITHUB_OUTPUT | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
prerelease: true | |
tag_name: ${{ steps.gen_tag.outputs.tag }} | |
files: output/${{matrix.OUT_FILE_NAME}} | |
generate_release_notes: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |