Skip to content

v4.2.10

v4.2.10 #68

Workflow file for this run

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Upload Python Package
on:
release:
types:
- published
jobs:
deploy:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'poetry'
- name: Install dependencies
run: |
poetry env use "3.10"
poetry install
- name: Install twine
run: pip install twine
- name: Build
run: |
poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'poetry'
- name: Install dependencies
run: |
poetry env use "3.10"
poetry install
- name: Build executable
run: poetry run python ./scripts/build.py
- name: Build cross-platform binary
run: |
chmod u+x ./scripts/make_binzip.sh
./scripts/make_binzip.sh
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/*
spotDL
build-arm:
runs-on: ubuntu-latest
name: Build on ubuntu-latest aarch64
steps:
- uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
with:
arch: aarch64
distro: ubuntu_latest
# Mount the artifacts directory as /artifacts in the container
dockerRunArgs: |
--volume "${PWD}/:/spotdl"
# The shell to run commands with in the container
shell: /bin/sh
run: |
cd /spotdl
apt update
apt install python3-full python3-pip pipx -y
pipx ensurepath
pipx install poetry
poetry install
rm -rf dist/
mkdir dist/
poetry run python ./scripts/build.py
for file in dist/spotdl*; do cp "$file" "${file}-aarch64"; done
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/spotdl*-aarch64