mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-03-21 19:13:10 +00:00
* chore(deps): bump actions/checkout from 4 to 6 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Squashed commit of the following: commit f73cbbeec37d40383e2b7d411e34048146776345 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun Feb 1 12:47:57 2026 +0000 chore(deps): bump actions/download-artifact from 4 to 7 Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v4...v7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Squashed commit of the following: commit 4da2d5f3600f52c7087ea350e3ec87a3c7cac535 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun Feb 1 12:48:00 2026 +0000 chore(deps): bump actions/github-script from 7 to 8 Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v7...v8) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Squashed commit of the following: commit 9e65b176252a554decf5574ca6a3463838a7a32f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun Feb 1 12:47:49 2026 +0000 chore(deps): bump actions/setup-node from 4 to 6 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 6. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Squashed commit of the following: commit a060f3c4cc5c3a4baf9c4827163acde1589ef26d Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun Feb 1 12:47:53 2026 +0000 chore(deps): bump actions/upload-artifact from 4 to 6 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(version): bump 4.30.0 * refactor: QR login and voice upload pages with improved UI and error handling - Enhanced styling for better user experience on qrlogin-nocookie.html and qrlogin.html - Added loading indicators and improved status messages during QR code login process - Updated error handling for login status retrieval - Refactored unblock_test.html for better layout and user interaction - Improved voice upload page with a more intuitive design and better feedback for file uploads - Added loading state management for voice list retrieval - Enhanced accessibility and usability across all modified pages * fix: Potential fix for code scanning alert no. 6: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 15: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * build: update utils --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
110 lines
3.1 KiB
YAML
110 lines
3.1 KiB
YAML
name: Build and Create PR
|
|
|
|
on:
|
|
workflow_dispatch: # 手动触发
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
include:
|
|
- os: ubuntu-latest
|
|
platform: linux
|
|
target: node18-linux-x64
|
|
output: precompiled/app
|
|
- os: windows-latest
|
|
platform: win
|
|
target: node18-win-x64
|
|
output: precompiled/app.exe
|
|
- os: macos-latest
|
|
platform: macos
|
|
target: node18-macos-x64
|
|
output: precompiled/app
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '18'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
npm install -g pnpm
|
|
pnpm install
|
|
|
|
- name: Build for ${{ matrix.platform }}
|
|
run: |
|
|
npm run pkg${{ matrix.platform }}
|
|
env:
|
|
PKG_TARGET: ${{ matrix.target }}
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: app-${{ matrix.platform }}
|
|
path: ${{ matrix.output }}
|
|
if-no-files-found: error
|
|
|
|
create-pr:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'workflow_dispatch' # 只在手动触发时创建PR
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@v7
|
|
with:
|
|
path: precompiled
|
|
|
|
- name: Display structure of downloaded files
|
|
run: ls -R
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
|
|
- name: Create new branch and commit
|
|
run: |
|
|
git config --global user.name 'github-actions[bot]'
|
|
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
|
|
|
BRANCH_NAME="auto-build-$(date +%Y%m%d-%H%M%S)"
|
|
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
|
git checkout -b $BRANCH_NAME
|
|
|
|
# 复制并整理下载的文件
|
|
mkdir -p precompiled
|
|
cp app-win/* precompiled/ || true
|
|
cp app-linux/* precompiled/ || true
|
|
cp app-macos/* precompiled/ || true
|
|
|
|
# 提交更改
|
|
git add precompiled/
|
|
git commit -m "Auto-build: Add compiled binaries for win, linux, macos" || exit 0
|
|
|
|
# 推送到远程仓库
|
|
git push origin $BRANCH_NAME
|
|
|
|
- name: Create Pull Request
|
|
uses: actions/github-script@v8
|
|
with:
|
|
script: |
|
|
const { data: pullRequest } = await github.rest.pulls.create({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
title: 'Auto-build: Add compiled binaries for win, linux, macos',
|
|
head: '${{ env.BRANCH_NAME }}',
|
|
base: 'main',
|
|
body: 'This PR contains newly built binaries for Windows, Linux, and macOS platforms.'
|
|
});
|
|
console.log(`Created PR #${pullRequest.number}: ${pullRequest.html_url}`);
|