Cross Compile Manual workflow #11
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
# Cross-compile workflow that is manually triggered | |
name: Cross Compile Manual workflow | |
# Controls when the action will run. Workflow runs when manually triggered using the UI | |
# or API. | |
on: | |
workflow_dispatch: | |
# Inputs the workflow accepts. | |
inputs: | |
mytag: | |
# Friendly description to be shown in the UI instead of 'name' | |
description: 'Input Tag' | |
# Default value if no value is explicitly provided | |
default: '0.0.0.0' | |
# Input has to be provided for the workflow to run | |
required: true | |
# The data type of the input | |
type: string | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
os: [macos-latest] | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: Check-out repository | |
uses: actions/checkout@v3 | |
- name: MacOS specific | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew update | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax | |
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified | |
cache: 'pip' | |
cache-dependency-path: | | |
**/dependencies*.txt | |
- name: Install Dependencies for All | |
run: | | |
pip install -r dependencies.txt | |
- name: Build Executable for ${{runner.os}} | |
uses: Nuitka/[email protected] | |
with: | |
nuitka-version: 1.8.5 | |
script-name: src/Main.py | |
# company-name: CONGO*blue (forked from zak-45) | |
file-version: ${{github.event.inputs.mytag}} | |
# windows-icon-from-ico: assets/BPM2OSC.ico | |
# macos-app-icon: assets/BPM2OSC.ico | |
onefile: true | |
onefile-tempdir-spec: dmt-temp | |
output-file: dmt-${{github.event.inputs.mytag}}-${{runner.os}} | |
- name: Make artefact executable | |
run: chmod +x build/dmt-${{github.event.inputs.mytag}}-${{runner.os}} | |
- name: Create temporary output folder | |
run: mkdir output | |
- name: Copy artefacts to temporary output folder | |
run: | | |
cp dLiveChannelList.xlsx output | |
cp dLiveChannelList.ods output | |
cp ThirdParty-Licenses.txt output | |
cp LICENSE output | |
cp build/dmt-${{github.event.inputs.mytag}}-${{runner.os}} output | |
- name: Create tar.gz | |
if: matrix.os == 'macos-latest' | |
run: | | |
cd output | |
tar -czvf dmt-${{github.event.inputs.mytag}}-${{runner.os}}.tgz * | |
mv *.tgz .. | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{runner.os}} Build | |
if-no-files-found: warn | |
path: 'dmt-${{github.event.inputs.mytag}}-${{runner.os}}**' | |
- name: Create Release ${{github.event.inputs.mytag}} with Builds from Nuitka | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
commit: main | |
tag: ${{github.event.inputs.mytag}} | |
artifacts: 'build/dmt-${{github.event.inputs.mytag}}-${{runner.os}}**' |