Skip to content

Update readme.md

Update readme.md #141

Workflow file for this run

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
- name: Install NSIS
uses: repolevedavaj/[email protected]
with:
nsis-version: 3.08
- name: Run NSIS and zip dist
run: |
makensis install-scripts/windows.nsi
Compress-Archive -Path "${{ steps.pyinstaller.outputs.executable_path }}/maestro/*" -Destination "${{ steps.pyinstaller.outputs.executable_path }}/maestro-windows.zip"
# - name: Upload installer as artifact
# uses: actions/upload-artifact@v4
# with:
# name: maestro-windows
# path: install-scripts/maestro-installer.exe
# - name: Upload executable as artifact
# uses: actions/upload-artifact@v4
# with:
# name: maestro-windows-dist
# path: "${{ steps.pyinstaller.outputs.executable_path }}/maestro"
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: |
install-scripts/maestro-installer.exe
${{ steps.pyinstaller.outputs.executable_path }}/maestro-windows.zip
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: true
pyinstaller-build-mac:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-12, macos-latest]
steps:
- name: Build executable
uses: PrajwalVandana/pyinstaller@c7c491de8409921df7045f681695d4d5ab71a4e0
id: pyinstaller
with:
python_ver: '3.12'
spec: specs/maestro-mac-x86.spec
requirements: requirements.txt
- 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, compress dist
run: |
mv "${{ steps.pkgbuild.outputs.output-path }}" "${{ steps.pyinstaller.outputs.executable_path }}/${{ matrix.os == 'macos-12' && 'maestro-cli-apple-silicon' || 'maestro-cli-mac-intel' }}.pkg"
tar -czf "${{ steps.pyinstaller.outputs.executable_path }}/${{ matrix.os == 'macos-12' && 'maestro-cli-apple-silicon' || 'maestro-cli-mac-intel' }}.tar.gz" "${{ steps.pyinstaller.outputs.executable_path }}/maestro"
# - name: Upload .pkg
# uses: actions/upload-artifact@v4
# with:
# name: ${{ matrix.os == 'macos-12' && 'maestro-mac-apple-silicon' || 'maestro-mac-intel' }}
# path: "${{ steps.pyinstaller.outputs.executable_path }}/maestro-cli.pkg"
# - name: Upload executable
# uses: actions/upload-artifact@v4
# with:
# name: ${{ matrix.os == 'macos-12' && 'maestro-mac-apple-silicon-dist' || 'maestro-mac-intel-dist' }}
# path: "${{ steps.pyinstaller.outputs.executable_path }}/maestro"
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: |
${{ steps.pyinstaller.outputs.executable_path }}/${{ matrix.os == 'macos-12' && 'maestro-cli-apple-silicon' || 'maestro-cli-mac-intel' }}.pkg
${{ steps.pyinstaller.outputs.executable_path }}/${{ matrix.os == 'macos-12' && 'maestro-cli-apple-silicon' || 'maestro-cli-mac-intel' }}.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: true
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
- name: Add install script and compress
run: |
mv install-scripts/ubuntu "${{ steps.pyinstaller.outputs.executable_path }}/maestro/install-maestro"
tar -czf "${{ steps.pyinstaller.outputs.executable_path }}/maestro-ubuntu.tar.gz" "${{ steps.pyinstaller.outputs.executable_path }}/maestro"
# - name: Upload executable
# uses: actions/upload-artifact@v4
# with:
# name: maestro-ubuntu
# path: "${{ steps.pyinstaller.outputs.executable_path }}/maestro"
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: |
${{ steps.pyinstaller.outputs.executable_path }}/maestro-ubuntu.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: true