Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update music-api version #75

Merged
merged 8 commits into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .electron-builder.config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 44 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ on:

jobs:
install:
name: Install dependencies and cache modeles
name: Cache node_modules
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Cache node modules
id: cache-node-modules
Expand All @@ -38,7 +40,7 @@ jobs:
steps.cache-cypress-binary.outputs.cache-hit != 'true'
run: |
corepack enable
yarn
yarn workspaces foreach install

# cypress-run:
# name: Cypress run
Expand Down Expand Up @@ -95,11 +97,13 @@ jobs:
# ./script/deploy.sh $ACCESS_TOKEN github.com/hq001/test_video.git tests/e2e

lint:
name: Yarn build
name: Lint code
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: actions/setup-node@v1
with:
Expand All @@ -118,43 +122,65 @@ jobs:
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: |
corepack enable
yarn install --frozen-lockfile
yarn workspaces foreach install

- name: Lint
run: |
corepack enable
yarn lint

build-electron:
name: Automatically release electron version
runs-on: macos-latest
name: Deploy Radishes
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
needs: install
steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: actions/setup-node@v1
with:
node-version: 16

- name: Load node_modules
id: cache-node-modules
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
# - name: Load node_modules
# id: cache-node-modules
# uses: actions/cache@v2
# with:
# path: |
# node_modules
# */*/node_modules
# key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install
if: steps.cache-node-modules.outputs.cache-hit != 'true'
# if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: |
corepack enable
yarn workspaces foreach install

- name: Build electron win
if: matrix.os == 'windows-latest'
run: |
corepack enable
yarn install --frozen-lockfile
yarn pkg:win
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build electron linux
if: matrix.os == 'ubuntu-latest'
run: |
corepack enable
yarn pkg:linux
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build electron
- name: Build electron macos
if: matrix.os == 'macos-latest'
run: |
corepack enable
yarn pkg
yarn pkg:macos
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "radishes-v2"]
path = packages/api
url = [email protected]:radishes-music/NeteaseCloudMusicApi.git
branch = radishes
28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
nodeLinker: node-modules
npmRegistryServer: 'https://registry.npmmirror.com'

npmRegistryServer: "https://registry.npmmirror.com"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
"author": "Linkontoask",
"description": "Cross-platform copyright-free music platform",
"scripts": {
"bootstrap": "npx [email protected] bootstrap",
"bootstrap": "yarn workspaces foreach install",
"dev": "concurrently -r \"yarn dev:api\" \"yarn generate:theme\" \"yarn dev:web\"",
"dev:web": "cross-env NODE_ENV=development vite --mode browser",
"dev:api": "lerna exec --scope @radishes/api -- yarn run dev",
"dev:api": "yarn workspace @radishes/api run dev",
"dev:electron": "concurrently -r \"yarn generate:theme\" \"electron-vite dev --mode electron.dev --outDir dist-electron\"",
"build": "cross-env NODE_ENV=production vite build --mode browser",
"build:electron": "npx electron-vite build --mode electron.build --outDir dist-electron",
"build:electron:win": "node script/build.js --win",
"build:electron:linux": "node script/build.js --linux",
"build:electron:macos": "node script/build.js --mac",
"build:api": "lerna exec --scope @radishes/api -- yarn run build",
"pkg": "npx rimraf dist-electron && yarn build:electron && npx electron-builder --config .electron-builder.config.js",
"build:web": "yarn generate:theme && cross-env NODE_ENV=production vite build --mode browser",
"build:electron": "npx rimraf dist-electron && npx electron-vite build --mode electron.build --outDir dist-electron",
"build:api": "yarn workspace @radishes/api run build",
"pkg:win": "yarn build:electron && yarn workspace @radishes/api run buildwin && npx electron-builder --config .electron-builder.config.js -w",
"pkg:linux": "yarn build:electron && yarn workspace @radishes/api run buildlinux && npx electron-builder --config .electron-builder.config.js -l",
"pkg:macos": "yarn build:electron && yarn workspace @radishes/api run buildmacos && npx electron-builder --config .electron-builder.config.js -m",
"test": "lerna run test --stream",
"test:unit": "vue-cli-service test:unit",
"test:open": "cypress open",
Expand Down
1 change: 1 addition & 0 deletions packages/api
Submodule api added at a4d528
34 changes: 0 additions & 34 deletions packages/api/.editorconfig

This file was deleted.

50 changes: 0 additions & 50 deletions packages/api/.eslintrc.js

This file was deleted.

6 changes: 0 additions & 6 deletions packages/api/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions packages/api/.npmignore

This file was deleted.

5 changes: 0 additions & 5 deletions packages/api/.prettierrc

This file was deleted.

4 changes: 0 additions & 4 deletions packages/api/.travis.yml

This file was deleted.

Loading
Loading