Skip to content

Commit

Permalink
Add github action: build
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekmj303 committed Jul 14, 2024
1 parent c057918 commit bb4c32d
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on:
push:
branches:
- release
pull_request:
branches:
- release

jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Check-out repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: |
**/requirements*.txt
- name: Install your Dependencies
run: |
pip install -r requirements.txt
- name: Build Executable with Nuitka
uses: Nuitka/Nuitka-Action@main
env:
DEBUG_COMPILATION: yes
with:
nuitka-version: main
script-name: ytm2spt.py

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }} Build
path: | # match what's created for the 3 OSes
build/*.exe
build/*.bin
build/*.app/**/*
overwrite: true
13 changes: 13 additions & 0 deletions ytm2spt.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Compilation mode, standalone everywhere, except on macOS there app bundle
# nuitka-project-if: {OS} in ("Windows", "Linux", "FreeBSD"):
# nuitka-project: --onefile
# nuitka-project-if: {OS} == "Darwin":
# nuitka-project: --standalone
# nuitka-project: --macos-create-app-bundle
#
# Debugging options, controlled via environment variable at compile time.
# nuitka-project-if: os.getenv("DEBUG_COMPILATION", "yes") == "yes"
# nuitka-project: --enable-console
# nuitka-project-else:
# nuitka-project: --disable-console

import os
import sys
from PySide6.QtWidgets import QApplication, QMainWindow, QWidget\
Expand Down

0 comments on commit bb4c32d

Please sign in to comment.