diff --git a/.envrc b/.envrc deleted file mode 100644 index fd24c66..0000000 --- a/.envrc +++ /dev/null @@ -1,4 +0,0 @@ -source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k=" - -export NIXPKGS_ALLOW_INSECURE=1 -use devenv diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4caf481..a604088 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,8 +1,5 @@ name: Release -env: - YARN_INSTALL_NOPT: yarn add --ignore-platform --ignore-optional - on: push: branches: @@ -17,11 +14,11 @@ jobs: strategy: matrix: - os: [macos-latest, windows-latest, ubuntu-22.04] + os: [macos-latest, windows-latest, ubuntu-18.04] steps: - name: Check out Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v2 with: submodules: "recursive" @@ -36,7 +33,7 @@ jobs: run: | sudo apt-get update && sudo apt-get install --no-install-recommends -y rpm && - sudo apt-get install --no-install-recommends -y libarchive-tools && + sudo apt-get install --no-install-recommends -y bsdtar && sudo apt-get install --no-install-recommends -y libopenjp2-tools - name: Install Snapcraft (on Ubuntu) @@ -45,43 +42,9 @@ jobs: with: snapcraft_token: ${{ secrets.snapcraft_token }} - - id: get_unm_version - name: Get the installed UNM version - run: | - yarn --ignore-optional - unm_version=$(node -e "console.log(require('./node_modules/@unblockneteasemusic/rust-napi/package.json').version)") - echo "::set-output name=unmver::${unm_version}" - shell: bash - - - name: Install UNM dependencies for Windows - if: runner.os == 'Windows' - run: | - ${{ env.YARN_INSTALL_NOPT }} \ - @unblockneteasemusic/rust-napi-win32-x64-msvc@${{steps.get_unm_version.outputs.unmver}} - shell: bash - - - name: Install UNM dependencies for macOS - if: runner.os == 'macOS' - run: | - ${{ env.YARN_INSTALL_NOPT }} \ - @unblockneteasemusic/rust-napi-darwin-x64@${{steps.get_unm_version.outputs.unmver}} \ - @unblockneteasemusic/rust-napi-darwin-arm64@${{steps.get_unm_version.outputs.unmver}} \ - dmg-license - shell: bash - - - name: Install UNM dependencies for Linux - if: runner.os == 'Linux' - run: | - ${{ env.YARN_INSTALL_NOPT }} \ - @unblockneteasemusic/rust-napi-linux-x64-gnu@${{steps.get_unm_version.outputs.unmver}} \ - @unblockneteasemusic/rust-napi-linux-arm64-gnu@${{steps.get_unm_version.outputs.unmver}} \ - @unblockneteasemusic/rust-napi-linux-arm-gnueabihf@${{steps.get_unm_version.outputs.unmver}} - shell: bash - - name: Build/release Electron app uses: samuelmeuli/action-electron-builder@v1.6.0 env: - VUE_APP_NETEASE_API_URL: /api VUE_APP_ELECTRON_API_URL: /api VUE_APP_ELECTRON_API_URL_DEV: http://127.0.0.1:10754 VUE_APP_LASTFM_API_KEY: 09c55292403d961aa517ff7f5e8a3d9c @@ -97,19 +60,19 @@ jobs: use_vue_cli: true - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v2 with: name: YesPlayMusic-mac path: dist_electron/*-universal.dmg if-no-files-found: ignore - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v2 with: name: YesPlayMusic-win path: dist_electron/*Setup*.exe if-no-files-found: ignore - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v2 with: name: YesPlayMusic-linux path: dist_electron/*.AppImage diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml deleted file mode 100644 index f8e0be8..0000000 --- a/.github/workflows/sync.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Upstream Sync - -permissions: - contents: write - issues: write - actions: write - -on: - schedule: - - cron: '0 * * * *' # every hour - workflow_dispatch: - -jobs: - sync_latest_from_upstream: - name: Sync latest commits from upstream repo - runs-on: ubuntu-latest - if: ${{ github.event.repository.fork }} - - steps: - - uses: actions/checkout@v4 - - - name: Clean issue notice - uses: actions-cool/issues-helper@v3 - with: - actions: 'close-issues' - labels: '🚨 Sync Fail' - - - name: Sync upstream changes - id: sync - uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 - with: - upstream_sync_repo: qier222/YesPlayMusic - upstream_sync_branch: master - target_sync_branch: master - target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set - test_mode: false - - - name: Sync check - if: failure() - uses: actions-cool/issues-helper@v3 - with: - actions: 'create-issue' - title: '🚨 同步失败 | Sync Fail' - labels: '🚨 Sync Fail' - body: | - Due to a change in the workflow file of the upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork. - - 由于上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次。 diff --git a/.gitignore b/.gitignore index d8dd8fc..b96fe0f 100644 --- a/.gitignore +++ b/.gitignore @@ -32,12 +32,3 @@ NeteaseCloudMusicApi-master.zip # Local Netlify folder .netlify vercel.json -# Devenv -.devenv* -devenv.local.nix - -# direnv -.direnv - -# pre-commit -.pre-commit-config.yaml diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index da2d398..0000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -14 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 2fb8f95..21db7b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,43 @@ FROM node:16.13.1-alpine as build ENV VUE_APP_NETEASE_API_URL=/api WORKDIR /app -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories &&\ - apk add --no-cache python3 make g++ git +RUN apk add --no-cache python3 make g++ git COPY package.json yarn.lock ./ RUN yarn install COPY . . -RUN yarn config set electron_mirror https://npmmirror.com/mirrors/electron/ && \ - yarn build +RUN yarn build FROM nginx:1.20.2-alpine as app +RUN echo $'server { \n\ + gzip on;\n\ + listen 80; \n\ + listen [::]:80; \n\ + server_name localhost; \n\ + \n\ + location / { \n\ + root /usr/share/nginx/html; \n\ + index index.html; \n\ + try_files $uri $uri/ /index.html; \n\ + } \n\ + \n\ + location @rewrites { \n\ + rewrite ^(.*)$ /index.html last; \n\ + } \n\ + \n\ + location /api/ { \n\ + proxy_set_header Host $host; \n\ + proxy_set_header X-Real-IP $remote_addr; \n\ + proxy_set_header X-Forwarded-For $remote_addr; \n\ + proxy_set_header X-Forwarded-Host $remote_addr; \n\ + proxy_set_header X-NginX-Proxy true; \n\ + proxy_pass http://localhost:3000/; \n\ + } \n\ + }' > /etc/nginx/conf.d/default.conf -COPY --from=build /app/package.json /usr/local/lib/ - -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories &&\ - apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main libuv \ +RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main libuv \ && apk add --no-cache --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main nodejs npm \ - && npm i -g $(awk -F \" '{if($2=="NeteaseCloudMusicApi") print $2"@"$4}' /usr/local/lib/package.json) \ - && rm -f /usr/local/lib/package.json + && npm i -g NeteaseCloudMusicApi -COPY --from=build /app/docker/nginx.conf.example /etc/nginx/conf.d/default.conf COPY --from=build /app/dist /usr/share/nginx/html -CMD nginx ; exec npx NeteaseCloudMusicApi \ No newline at end of file +CMD nginx ; exec npx NeteaseCloudMusicApi diff --git a/LICENSE b/LICENSE index 7385fd2..d95eafc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020-2023 qier222 +Copyright (c) 2020-2022 qier222 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 146f524..3b9b4fe 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@
高颜值的第三方网易云播放器
- 🌎 访问DEMO |
+ 🌎 访问DEMO |
📦️ 下载安装包 |
💬 加入交流群
@@ -16,12 +16,7 @@