Add CCACHE and mingw64 windows #6
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: | |
create_tag: | |
runs-on: ubuntu-latest | |
name: Create Pre-Release Tag name | |
outputs: | |
tag: ${{ steps.gen_tag.outputs.tag }} | |
steps: | |
- name: Generate tag | |
id: gen_tag | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const now = new Date(); | |
const tag = `${{ github.ref_name }}.${now.getUTCFullYear()}.${(now.getUTCMonth()+1).toString().padStart(2, '0')}.${now.getUTCDate().toString().padStart(2, '0')}.${now.getUTCHours().toString().padStart(2, '0')}.${now.getUTCMinutes().toString().padStart(2, '0')}.${now.getUTCSeconds().toString().padStart(2, '0')}`; | |
core.setOutput('tag', tag); | |
build: | |
runs-on: ${{ matrix.os }} | |
needs: create_tag | |
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 --assume-yes-for-downloads && | |
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 --follow-imports --assume-yes-for-downloads --mingw64 && | |
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 --assume-yes-for-downloads && | |
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: msys2/setup-msys2@v2 | |
- uses: hendrikmuhs/ccache-action@v1.2 | |
- 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: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
prerelease: true | |
tag_name: ${{ needs.create_tag.outputs.tag }} | |
files: output/${{matrix.OUT_FILE_NAME}} | |
generate_release_notes: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |