Macos ora viene distribuito come .dmg invece di .zip: - contiene MusicTools.app + alias Applicazioni + "Fix Gatekeeper.command" - doppio click sullo script rimuove com.apple.quarantine senza Terminal manuale -> niente piu' "App non verificata" Backend: /api/download serve .dmg con Content-Type application/x-apple-diskimage. Landing /download aggiornata con il nuovo flusso (3 step).
133 lines
3.7 KiB
YAML
133 lines
3.7 KiB
YAML
name: Build MusicTools
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: write # serve per creare le Release
|
|
|
|
jobs:
|
|
# =========================================================
|
|
# macOS
|
|
# =========================================================
|
|
build-macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r requirements.txt
|
|
pip install pyinstaller
|
|
|
|
- name: Install ffmpeg
|
|
run: brew install ffmpeg
|
|
|
|
- name: Build app
|
|
run: python build_macos.py
|
|
|
|
- name: Create DMG
|
|
run: |
|
|
STAGING="dmg_staging"
|
|
rm -rf "$STAGING"
|
|
mkdir -p "$STAGING"
|
|
cp -R dist/MusicTools.app "$STAGING/"
|
|
cp "assets/Fix Gatekeeper.command" "$STAGING/"
|
|
chmod +x "$STAGING/Fix Gatekeeper.command"
|
|
ln -s /Applications "$STAGING/Applications"
|
|
cat > "$STAGING/LEGGIMI.txt" <<'EOF'
|
|
INSTALLAZIONE MusicTools
|
|
========================
|
|
|
|
1) Trascina MusicTools.app sulla cartella "Applicazioni"
|
|
(l'alias e' qui dentro nel DMG)
|
|
|
|
2) Doppio click su "Fix Gatekeeper.command"
|
|
Rimuove la quarantena macOS Gatekeeper (una sola volta).
|
|
|
|
3) Apri MusicTools dalle Applicazioni e attiva con email + chiave.
|
|
|
|
Problemi? scrivici a info@djluza.com
|
|
EOF
|
|
hdiutil create -volname "MusicTools" -srcfolder "$STAGING" \
|
|
-ov -format UDZO MusicTools-macOS.dmg
|
|
ls -lh MusicTools-macOS.dmg
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: MusicTools-macOS
|
|
path: MusicTools-macOS.dmg
|
|
retention-days: 14
|
|
|
|
# =========================================================
|
|
# Windows
|
|
# =========================================================
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r requirements.txt
|
|
pip install pyinstaller
|
|
|
|
- name: Build exe
|
|
run: python build_windows.py
|
|
|
|
- name: Package -> zip
|
|
shell: pwsh
|
|
run: |
|
|
Compress-Archive -Path dist/MusicTools/* -DestinationPath MusicTools-Windows.zip -CompressionLevel Optimal
|
|
Get-Item MusicTools-Windows.zip
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: MusicTools-Windows
|
|
path: MusicTools-Windows.zip
|
|
retention-days: 14
|
|
|
|
# =========================================================
|
|
# Release (solo su tag v*)
|
|
# =========================================================
|
|
release:
|
|
needs: [build-macos, build-windows]
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download macOS artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: MusicTools-macOS
|
|
path: artifacts/macos
|
|
|
|
- name: Download Windows artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: MusicTools-Windows
|
|
path: artifacts/windows
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
name: MusicTools ${{ github.ref_name }}
|
|
tag_name: ${{ github.ref_name }}
|
|
generate_release_notes: true
|
|
fail_on_unmatched_files: true
|
|
files: |
|
|
artifacts/macos/MusicTools-macOS.dmg
|
|
artifacts/windows/MusicTools-Windows.zip
|