pypi-publish:
runs-on: ubuntu-latest
if: ${{ ! inputs.tags }}
- needs:
- - build-artifact
+ needs: build-artifact
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
runs-on: ubuntu-latest
permissions:
packages: write
- needs: build-artifact
+ needs:
+ - build-artifact
+ - pypi-publish
+ if: |
+ always() &&
+ ((github.event.release.prerelease == false && needs.pypi-publish.result == 'success') ||
+ (github.event.release.prerelease == true && needs.pypi-publish.result == 'skipped') ||
+ (inputs.tags && needs.pypi-publish.result == 'skipped'))
steps:
- - name: Retrieve release distributions
- uses: actions/download-artifact@v4
- with:
- name: release-dists
- path: dist/
- - name: Copy Wheel to new location
- shell: bash
- run: |
- mkdir -p pre_built_whl
- cp dist/*.whl pre_built_whl/
- uses: actions/checkout@v4.1.4
- name: Download Widevine CDM client files from private repository
shell: bash
mkdir -p widevine_cdm && cd widevine_cdm
curl -OJ -H "Authorization: token ${TOKEN}" https://raw.githubusercontent.com/music-assistant/appvars/main/widevine_cdm_client/private_key.pem
curl -OJ -H "Authorization: token ${TOKEN}" https://raw.githubusercontent.com/music-assistant/appvars/main/widevine_cdm_client/client_id.bin
+ - name: Retrieve release distributions
+ uses: actions/download-artifact@v4
+ with:
+ name: release-dists
+ path: dist/
- name: Log in to the GitHub container registry
uses: docker/login-action@v3.3.0
with:
push: true
build-args: |
MASS_VERSION=${{ needs.build-artifact.outputs.version }}
- DEV_RELEASE="true"
- MASS_INSTALL_LOCATION="/tmp/music_assistant-${{ needs.build-artifact.outputs.version }}-py3-none-any.whl"
release-notes-update:
name: Updates the release notes and changelog
ARG MASS_VERSION
ARG TARGETPLATFORM
-ARG DEV_RELEASE="false"
-ARG MASS_INSTALL_LOCATION="music-assistant[server]==${MASS_VERSION}"
RUN set -x \
&& apk add --no-cache \
# Copy widevine client files to container
RUN mkdir -p /usr/local/bin/widevine_cdm
COPY widevine_cdm/* /usr/local/bin/widevine_cdm/
-COPY pre_built_whl/music_assistant-${MASS_VERSION}-py3-none-any.whl /tmp/
-
-RUN bash -c 'if [ "${DEV_RELEASE}" = "false" ]; then rm /tmp/music_assistant-${MASS_VERSION}-py3-none-any.whl; fi'
# Upgrade pip + Install uv
RUN pip install --upgrade pip \
--system \
--no-cache \
--find-links "https://wheels.home-assistant.io/musllinux/" \
- ${MASS_INSTALL_LOCATION}
+ dist/music_assistant-${MASS_VERSION}-py3-none-any.whl
# Configure runtime environmental variables
ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2"