i might km #84
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: Cross-Platform Build | |
on: push | |
jobs: | |
pyinstaller-build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Build executable | |
uses: PrajwalVandana/pyinstaller@c7c491de8409921df7045f681695d4d5ab71a4e0 | |
id: pyinstaller | |
with: | |
python_ver: '3.12' | |
spec: specs/maestro-windows.spec | |
requirements: requirements.txt | |
lfs: true | |
- name: Install NSIS | |
run: | | |
choco install -y nsis | |
# - name: Move executable to dist | |
# run: | | |
# if (-Not (Test-Path dist)) { New-Item -ItemType Directory -Path dist } | |
# Move-Item "${{ steps.pyinstaller.outputs.executable_path }}/maestro" dist/maestro | |
# shell: pwsh | |
- name: Run NSIS | |
# run: | | |
# "C:\Program Files\NSIS\makensis.exe" install-scripts\windows.nsi | |
run: | | |
makensis install-scripts/windows.nsi | |
- name: Upload executable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: maestro-windows | |
path: install-scripts/maestro-installer.exe | |
pyinstaller-build-mac-x86: | |
runs-on: macos-12 | |
steps: | |
- name: Build executable | |
uses: PrajwalVandana/pyinstaller@c7c491de8409921df7045f681695d4d5ab71a4e0 | |
id: pyinstaller | |
with: | |
python_ver: '3.12' | |
spec: specs/maestro-mac-x86.spec | |
requirements: requirements.txt | |
lfs: true | |
- name: Read version from __version__.py | |
id: version | |
# read VERSION = "a.b.c" from __version__.py | |
run: | | |
VERSION=$(sed -n 's/VERSION = "\([^"]*\)"/\1/p' maestro/__version__.py) | |
echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
- name: Add install script | |
run: | | |
mkdir -p "${{ steps.pyinstaller.outputs.executable_path }}/Scripts" | |
mv install-scripts/mac "${{ steps.pyinstaller.outputs.executable_path }}/Scripts/postinstall" | |
- name: Create .pkg | |
id: pkgbuild | |
# main branch | |
# uses: PrajwalVandana/generate-mac-installer-github-action@fd5c2a03cfc2be65e32095573392ed03423a4208 | |
# dev branch | |
uses: PrajwalVandana/generate-mac-installer-github-action@9d0c29930827283cce48688cb2154b47c92a4042 | |
with: | |
root-directory: "${{ steps.pyinstaller.outputs.executable_path }}/maestro" | |
scripts-directory: "${{ steps.pyinstaller.outputs.executable_path }}/Scripts" | |
identifier: com.maestro.maestro-cli | |
version: ${{ steps.version.outputs.version }} | |
install-location: /usr/local/bin/maestro-bundle/ | |
- name: Rename .pkg | |
run: | | |
mv "${{ steps.pkgbuild.outputs.output-path }}" "${{ steps.pyinstaller.outputs.executable_path }}/maestro-cli.pkg" | |
- name: Upload .pkg | |
uses: actions/upload-artifact@v4 | |
with: | |
name: maestro-mac-intel | |
path: "${{ steps.pyinstaller.outputs.executable_path }}/maestro-cli.pkg" | |
pyinstaller-build-mac-arm: | |
runs-on: macos-latest | |
steps: | |
- name: Build executable | |
uses: PrajwalVandana/pyinstaller@c7c491de8409921df7045f681695d4d5ab71a4e0 | |
id: pyinstaller | |
with: | |
python_ver: '3.12' | |
spec: specs/maestro-mac-arm.spec | |
requirements: requirements.txt | |
lfs: true | |
- name: Read version from __version__.py | |
id: version | |
# read VERSION = "a.b.c" from __version__.py | |
run: | | |
VERSION=$(sed -n 's/VERSION = "\([^"]*\)"/\1/p' maestro/__version__.py) | |
echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
- name: Add install script | |
run: | | |
mkdir -p "${{ steps.pyinstaller.outputs.executable_path }}/Scripts" | |
mv install-scripts/mac "${{ steps.pyinstaller.outputs.executable_path }}/Scripts/postinstall" | |
- name: Create .pkg | |
id: pkgbuild | |
# main branch | |
# uses: PrajwalVandana/generate-mac-installer-github-action@fd5c2a03cfc2be65e32095573392ed03423a4208 | |
# dev branch | |
uses: PrajwalVandana/generate-mac-installer-github-action@9d0c29930827283cce48688cb2154b47c92a4042 | |
with: | |
root-directory: "${{ steps.pyinstaller.outputs.executable_path }}/maestro" | |
scripts-directory: "${{ steps.pyinstaller.outputs.executable_path }}/Scripts" | |
identifier: com.maestro.maestro-cli | |
version: ${{ steps.version.outputs.version }} | |
install-location: /usr/local/bin/maestro-bundle/ | |
- name: Rename .pkg | |
run: | | |
mv "${{ steps.pkgbuild.outputs.output-path }}" "${{ steps.pyinstaller.outputs.executable_path }}/maestro-cli.pkg" | |
- name: Upload .pkg | |
uses: actions/upload-artifact@v4 | |
with: | |
name: maestro-mac-apple-silicon | |
path: "${{ steps.pyinstaller.outputs.executable_path }}/maestro-cli.pkg" | |
pyinstaller-build-linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Build executable | |
uses: PrajwalVandana/pyinstaller@c7c491de8409921df7045f681695d4d5ab71a4e0 | |
id: pyinstaller | |
with: | |
python_ver: '3.12' | |
spec: specs/maestro-ubuntu.spec | |
requirements: requirements.txt | |
lfs: true | |
- name: Add install script | |
run: | | |
mv install-scripts/ubuntu "${{ steps.pyinstaller.outputs.executable_path }}/maestro/install-maestro" | |
- name: Upload executable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: maestro-ubuntu | |
path: "${{ steps.pyinstaller.outputs.executable_path }}/maestro" |