mirror of
https://github.com/WorldObservationLog/AppleMusicDecrypt.git
synced 2026-01-15 14:22:54 -03:00
55 lines
2.6 KiB
YAML
55 lines
2.6 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- v2
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build_winodws:
|
|
name: Build Windows
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Create venv
|
|
run: |
|
|
Invoke-WebRequest -Uri "https://github.com/winpython/winpython/releases/download/16.6.20250620/Winpython64-3.12.10.1dotrc.zip" -OutFile winpy.zip
|
|
$td="$env:TEMP";Expand-Archive .\winpy.zip $td;if(-not(Test-Path .\.venv)){New-Item -ItemType Directory .\.venv | Out-Null};Copy-Item "$td\WPy64-312101\python\*" .\.venv -Recurse -Force;Remove-Item "$td\WPy64-312101" -Recurse -Force;Remove-Item .\winpy.zip -Recurse -Force
|
|
- name: Install dependencies
|
|
run: |
|
|
.\.venv\python.exe -m pip install poetry
|
|
.\.venv\python.exe -m poetry install
|
|
- name: Prepare environment and config
|
|
run: |
|
|
Copy-Item config.example.toml config.toml
|
|
(Get-Content config.toml) -replace 'url = "127.0.0.1:8080"','url = "wm.wol.moe"' -replace 'secure = false','secure = true' | Set-Content config.toml
|
|
|
|
@'
|
|
$env:PATH="$(Split-Path -Parent $MyInvocation.MyCommand.Path)\deps;"
|
|
.\.venv\python.exe main.py
|
|
'@ | Out-File -FilePath start.ps1 -Encoding UTF8
|
|
|
|
@'
|
|
set PATH=%~dp0deps; && .venv\python.exe main.py
|
|
'@ | Out-File -FilePath start.bat -Encoding ASCII
|
|
- name: Prepare dependencies
|
|
run: |
|
|
mkdir deps
|
|
cd deps
|
|
Invoke-WebRequest -Uri https://www.7-zip.org/a/7zr.exe -OutFile 7z.exe
|
|
Invoke-WebRequest -Uri https://www.7-zip.org/a/7z2501-x64.exe -OutFile 7z-installer.exe
|
|
.\7z.exe x 7z-installer.exe -o7z
|
|
Invoke-WebRequest -Uri https://download.tsi.telecom-paristech.fr/gpac/new_builds/gpac_latest_head_win64.exe -OutFile gpac-installer.exe
|
|
.\7z\7z.exe x gpac-installer.exe -oGPAC
|
|
cp GPAC/*.exe, GPAC/*.dll .
|
|
Invoke-WebRequest -Uri https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-essentials.7z -OutFile ffmpeg.7z
|
|
.\7z\7z.exe e .\ffmpeg.7z ffmpeg.exe -r "-o."
|
|
Invoke-WebRequest -Uri https://www.bok.net/Bento4/binaries/Bento4-SDK-1-6-0-641.x86_64-microsoft-win32.zip -OutFile Bento4-tools.zip
|
|
.\7z\7z.exe e .\Bento4-tools.zip mp4extract.exe mp4edit.exe mp4decrypt.exe -r "-o."
|
|
rm -Recurse Bento4-tools.zip, 7z, 7z.exe, 7z-installer.exe, ffmpeg.7z, gpac-installer.exe, GPAC
|
|
- name: Upload CLI artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: AppleMusicDecrypt-Windows
|
|
path: .
|
|
include-hidden-files: true
|