player: support media decryption keys for mpv (#1050) #192
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release for macos | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| build-n-publish: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| # Allow some jobs fail. | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, macos-14] | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Build | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyinstaller | |
| pip install -e .[qt,macos,battery,cookies,ytdl,ai] | |
| - name: Install libmpv | |
| run: | | |
| brew install mpv | |
| - name: Setup OS version and ARCH | |
| run: | | |
| echo "FUO_MACOS_VERSION=`sw_vers --productVersion`" >> $GITHUB_ENV | |
| - name: Setup DYLD path for macos-arm64 | |
| run: | | |
| # Python can't find libmpv on macOS arm64 by default. | |
| # This problem does not exist on macOS with x86_64. | |
| echo "DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib" >> $GITHUB_ENV | |
| echo "DYLD_FALLBACK_FRAMEWORK_PATH=/opt/homebrew/Frameworks" >> $GITHUB_ENV | |
| - name: Test if no syntax error | |
| run: feeluown -h | |
| - name: Bundle | |
| run: | | |
| make bundle | |
| - name: Archive | |
| run: | | |
| # List dist to help double check if bundle is ok. | |
| ls dist/ | |
| arch=`uname -m` | |
| macos_version=`sw_vers -productVersion` | |
| cd dist/ && zip FeelUOwnX-macOS${macos_version}-${arch}.zip -r FeelUOwnX.app/ | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: FeelUOwnX-macOS${{ env.FUO_MACOS_VERSION }}-${{ env.RUNNER_ARCH }}.zip | |
| path: dist/FeelUOwnX*.zip | |
| - name: Upload to release page | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: dist/FeelUOwnX*.zip | |
| - name: Upload to nightly | |
| if: github.ref == 'refs/heads/master' | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: dist/FeelUOwnX*.zip | |
| tag_name: nightly |