From ee4aa7431f28208fab54f8a01cd97e1c7c2cb13e Mon Sep 17 00:00:00 2001 From: wudingfeng Date: Tue, 5 Dec 2023 15:48:51 +0800 Subject: [PATCH] feat: add wdf_dev workflow --- .github/workflows/build-unstable-dev.yml | 122 +++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 .github/workflows/build-unstable-dev.yml diff --git a/.github/workflows/build-unstable-dev.yml b/.github/workflows/build-unstable-dev.yml new file mode 100644 index 0000000..830d69f --- /dev/null +++ b/.github/workflows/build-unstable-dev.yml @@ -0,0 +1,122 @@ +name: Build-Unstable-Dev-Product + +on: + push: + branches: + - wdf_dev + +jobs: + release: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + + steps: + - name: Check out Git repository + uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - uses: pnpm/action-setup@v2.0.1 + with: + version: 8.6.12 + + - name: Install Node.js 18 + uses: actions/setup-node@v2 + with: + node-version: 18.12.1 + cache: 'pnpm' + + - name: Install global dependencies + run: npm i prisma fastify-cli turbo tsx electron-builder@23.6.0 -g + + - name: Install dependencies + run: pnpm install + + - name: Copy Env + run: cp .env.example .env + + # - name: Build sqlite3 binaries + # run: tsx ./scripts/build.sqlite3.ts + + # - name: Install RPM & Pacman (Linux) + # if: runner.os == 'Linux' + # run: | + # sudo apt-get update && + # sudo apt-get install --no-install-recommends -y rpm && + # sudo apt-get install --no-install-recommends -y bsdtar && + # sudo apt-get install --no-install-recommends -y libopenjp2-tools + + # - name: Install Snapcraft (Linux) + # uses: samuelmeuli/action-snapcraft@v1 + # if: startsWith(matrix.os, 'ubuntu') + # with: + # Disable since the Snapcraft token is currently not working + # snapcraft_token: ${{ secrets.snapcraft_token }} + + - name: Build-Unstable-Dev XtifyMusic app + env: + ELECTRON_WEB_SERVER_PORT: 42710 + ELECTRON_DEV_NETEASE_API_PORT: 30001 + UNBLOCK_SERVER_PORT: 30003 + VITE_APP_NETEASE_API_URL: /netease + ENABLE_FLAC: "true" + ENABLE_LOCAL_VIP: "svip" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: pnpm package + # - name: Build-Release Electron app + # uses: njzydark/action-electron-builder-pnpm@v1.2.0-pnpm + # env: + # ELECTRON_WEB_SERVER_PORT: 42710 + # ELECTRON_DEV_NETEASE_API_PORT: 30001 + # UNBLOCK_SERVER_PORT: 30003 + # VITE_APP_NETEASE_API_URL: /netease + # ENABLE_FLAC: "true" + # ENABLE_LOCAL_VIP: "svip" + # with: + # # GitHub token, automatically provided to the action + # # (No need to define this secret in the repo settings) + # github_token: ${{ secrets.github_token }} + # # If the commit is tagged with a version (e.g. "v1.0.0"), + # # release the app after building + # release: ${{ startsWith(github.ref, 'refs/tags/v') }} + # args: package + # # skip_package_manager_install: true + # package_manager: pnpm + + - name: Upload Artifact (macOS universal) + uses: actions/upload-artifact@v3 + with: + name: R3PLAYX-mac-universal + path: ./packages/desktop/release/*-universal.dmg + if-no-files-found: ignore + + - name: Upload Artifact (macOS x64) + uses: actions/upload-artifact@v3 + with: + name: R3PLAYX-mac-x64 + path: ./packages/desktop/release/*-x64.dmg + if-no-files-found: ignore + + - name: Upload Artifact (macOS arm64) + uses: actions/upload-artifact@v3 + with: + name: R3PLAYX-mac-arm64 + path: ./packages/desktop/release/*-arm64.dmg + if-no-files-found: ignore + + - name: Upload Artifact (Windows) + uses: actions/upload-artifact@v3 + with: + name: R3PLAYX-win + path: ./packages/desktop/release/*x64-Setup.exe + if-no-files-found: ignore + + - name: Upload Artifact (Linux) + uses: actions/upload-artifact@v3 + with: + name: R3PLAYX-linux + path: ./packages/desktop/release/*.AppImage + if-no-files-found: ignore