gui: add menu action '搜索相似资源' (#876) #48
This file contains 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-13, macos-12] | |
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 pyqt5 | |
pip install pyinstaller | |
pip install -e .[macos,battery,cookies,ytdl] | |
- name: Install libmpv | |
run: | | |
brew install mpv | |
- name: Setup DYLD path for macos-arm64 | |
if: matrix.os == 'macos-latest' | |
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@v3 | |
with: | |
name: FeelUOwnX-macOS{{ env.DIST_MACOS_VERSION }}-{{ env.DIST_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 |