Skip to content

.github/workflows/main.yml #7

.github/workflows/main.yml

.github/workflows/main.yml #7

Workflow file for this run

on:
release:
types: [prereleased]
jobs:
build_winodws:
name: Build Windows Version
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
architecture: x64
- name: Install dependencies
run: |
python -m pip install poetry
poetry install
poetry run python -m pip install nuitka
- name: Build
run: |
poetry run python -m nuitka main.py --assume-yes-for-downloads --standalone --follow-imports --include-data-dir=assets=assets --include-data-files=config.example.toml=config.toml --include-data-files=agent.js=agent.js --include-data-files=m3u8.js=m3u8.js --include-data-files=m3u8_sv.js=m3u8_sv.js --include-module=mitmproxy_windows --include-module=winloop
- name: Rename
run: |
ren main.dist AppleMusicDecrypt
- name: tar
run: |
tar -czvf AppleMusicDecrypt-Windows.tar.gz ./AppleMusicDecrypt
- name: Upload CLI artifact
uses: actions/upload-artifact@v4
with:
name: AppleMusicDecrypt-Windows.tar.gz
path: AppleMusicDecrypt-Windows.tar.gz
# 发布release版本
- name: Release version
uses: ncipollo/release-action@v1
if: github.event_name == 'release'
with:
allowUpdates: true
artifacts: AppleMusicDecrypt-Windows.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}