forked from qier222/YesPlayMusic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: switch to UNM (Rust) (qier222#1536)
* refactor: use unm-rust-napi * ci(build): install UNM dependencies for certain platforms * feat: add the ability to configure UNM * feat: add the UNM configuration in settings page * refactor(jsconfig): jsx -> preserve * fix(ci/build): use bash to get unm version * chore(deps): upgrade UNM to 0.3.0-pre.0 * refactor(electron/ipcMain): update default sources * fix(views/settings): remove duplicated config entry * feat(settings): allow configuring QQ cookie We also removed some duplicate entries in views/settings.vue. * chore(deps): UNM -> 0.3.0-pre.1 * refactor: remove unused old UNM * fix(utils/player): do not include rust-napi in client code As we only imported the constant, I just expand it as the integer. Co-authored-by: qier222 <[email protected]>
- Loading branch information
Showing
8 changed files
with
452 additions
and
208 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
name: Release | ||
|
||
env: | ||
YARN_INSTALL_NOPT: yarn add --ignore-platform --ignore-optional | ||
|
||
on: | ||
push: | ||
branches: | ||
|
@@ -42,6 +45,39 @@ 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/[email protected] | ||
env: | ||
|
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
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
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
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
Oops, something went wrong.