Skip to content
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
236 changes: 236 additions & 0 deletions .github/workflows/dev-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
name: Dev Release Build

on:
workflow_dispatch:
inputs:
platform:
description: 'Target platform'
required: true
type: choice
options:
- macos
- linux
- windows
version:
description: 'Version to set (optional)'
required: false
type: string

Comment on lines +3 to +18
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add minimal permissions and concurrency to reduce risk and duplicate builds.

Tighten token scope and auto-cancel overlapping runs per platform.

 on:
   workflow_dispatch:
     inputs:
       platform:
         description: 'Target platform'
         required: true
         type: choice
         options:
           - macos
           - linux
           - windows
       version:
         description: 'Version to set (optional)'
         required: false
         type: string
+
+permissions:
+  contents: read
+
+concurrency:
+  group: dev-release-${{ github.workflow }}-${{ inputs.platform || 'all' }}
+  cancel-in-progress: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
on:
workflow_dispatch:
inputs:
platform:
description: 'Target platform'
required: true
type: choice
options:
- macos
- linux
- windows
version:
description: 'Version to set (optional)'
required: false
type: string
on:
workflow_dispatch:
inputs:
platform:
description: 'Target platform'
required: true
type: choice
options:
- macos
- linux
- windows
version:
description: 'Version to set (optional)'
required: false
type: string
permissions:
contents: read
concurrency:
group: dev-release-${{ github.workflow }}-${{ github.event.inputs.platform || 'all' }}
cancel-in-progress: true
🤖 Prompt for AI Agents
In .github/workflows/dev-release.yml around lines 3 to 18, add minimal
permissions and a concurrency key: set a minimal permissions block (for example
"permissions: contents: read" or the smallest permission set required by the
jobs that follow) directly under the workflow header, and add a concurrency
section to cancel overlapping runs per platform (e.g., concurrency: group: "${{
github.workflow }}-${{ github.event.inputs.platform || 'default' }}" and
cancel-in-progress: true) so token scope is tightened and duplicate builds for
the same platform are auto-cancelled.

jobs:
build-macos:
runs-on: macos-latest
if: ${{ inputs.platform == 'macos' }}

Comment on lines +21 to +23
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Set a job timeout to prevent hung builds.

   build-macos:
     runs-on: macos-latest
+    timeout-minutes: 60
     if: ${{ inputs.platform == 'macos' }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
runs-on: macos-latest
if: ${{ inputs.platform == 'macos' }}
runs-on: macos-latest
timeout-minutes: 60
if: ${{ inputs.platform == 'macos' }}
🤖 Prompt for AI Agents
In .github/workflows/dev-release.yml around lines 21 to 23, the job lacks a
timeout setting which can allow hung builds to run indefinitely; add a
timeout-minutes field to the job definition (e.g., timeout-minutes: 30 or
another team-approved value) directly under the runs-on line so the job will be
automatically cancelled after the specified time.

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v3
with:
Comment on lines +44 to +45
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Upgrade actions/cache to v4 to avoid runner warnings.

actionlint flags v3 as too old on current runners.

Apply across all jobs:

-      - name: Setup pnpm cache
-        uses: actions/cache@v3
+      - name: Setup pnpm cache
+        uses: actions/cache@v4

Also applies to: 117-118, 190-191

🧰 Tools
🪛 actionlint (1.7.7)

44-44: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
.github/workflows/dev-release.yml lines 44-45 (and also update occurrences at
117-118 and 190-191): the workflow is using actions/cache@v3 which triggers
runner warnings; update the uses entries to actions/cache@v4 for each
occurrence, ensure the with: block parameters remain compatible with v4, and run
a quick lint or dry-run of the workflow to confirm no additional changes are
required.

path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Set version
if: ${{ inputs.version != '' }}
shell: bash
run: |
node -e "
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
pkg.version = '${{ inputs.version }}';
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
console.log(\`Version set to \${pkg.version}\`);
"

- name: Build macOS package
run: |
pnpm build
pnpm exec electron-builder --mac --publish never
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ELECTRON_BUILDER_CHANNEL: dev

Comment on lines +71 to +73
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Prevent accidental macOS code signing lookups in dev builds.

Avoids delays/failures if a signing identity is present on hosted runners.

       env:
         GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        ELECTRON_BUILDER_CHANNEL: dev
+        ELECTRON_BUILDER_CHANNEL: dev
+        CSC_IDENTITY_AUTO_DISCOVERY: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ELECTRON_BUILDER_CHANNEL: dev
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ELECTRON_BUILDER_CHANNEL: dev
CSC_IDENTITY_AUTO_DISCOVERY: false
🤖 Prompt for AI Agents
In .github/workflows/dev-release.yml around lines 71 to 73, prevent accidental
macOS code signing lookups by adding the environment variable
CSC_IDENTITY_AUTO_DISCOVERY: 'false' to the workflow env (next to GH_TOKEN and
ELECTRON_BUILDER_CHANNEL) so electron-builder won’t attempt to discover signing
identities on hosted macOS runners; ensure the value is the literal string
'false'.

- name: List build artifacts
shell: bash
run: |
echo "Build artifacts:"
find dist -type f -name "*" | head -20

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: macos-dev-artifacts
path: |
dist/*.dmg
dist/*.zip
dist/*.yml
dist/*.yaml
dist/*.blockmap
retention-days: 30
Comment on lines +66 to +90
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Optional: reduce duplication with a strategy matrix.

You can parameterize platform, build flags, and artifact globs to one job. This will simplify maintenance as patterns evolve.

I can provide a matrix-based rewrite if you'd like to adopt it.

Also applies to: 139-165, 212-236

if-no-files-found: warn

build-linux:
runs-on: ubuntu-latest
if: ${{ inputs.platform == 'linux' }}

Comment on lines +94 to +96
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Mirror the timeout on Linux.

   build-linux:
     runs-on: ubuntu-latest
+    timeout-minutes: 60
     if: ${{ inputs.platform == 'linux' }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
runs-on: ubuntu-latest
if: ${{ inputs.platform == 'linux' }}
runs-on: ubuntu-latest
timeout-minutes: 60
if: ${{ inputs.platform == 'linux' }}
🤖 Prompt for AI Agents
.github/workflows/dev-release.yml around lines 94-96: the Linux job lacks the
timeout setting present for other platforms; add a timeout-minutes entry to this
job (directly under runs-on) using the same numeric value used for the other
platform job in this workflow so the Linux run mirrors the same timeout
behavior.

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Set version
if: ${{ inputs.version != '' }}
shell: bash
run: |
node -e "
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
pkg.version = '${{ inputs.version }}';
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
console.log(\`Version set to \${pkg.version}\`);
"

- name: Build Linux package
run: |
pnpm build
pnpm exec electron-builder --linux --publish never
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ELECTRON_BUILDER_CHANNEL: dev

Comment on lines +144 to +146
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Apply the same no-sign setting for Linux (harmless, keeps parity).

       env:
         GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        ELECTRON_BUILDER_CHANNEL: dev
+        ELECTRON_BUILDER_CHANNEL: dev
+        CSC_IDENTITY_AUTO_DISCOVERY: false
🤖 Prompt for AI Agents
In .github/workflows/dev-release.yml around lines 144-146, the Linux job is
missing the no-sign environment flag; add the same no-sign env var used for
other platforms (e.g., NO_SIGN: "true" or the repository's existing no-sign
variable) under the job's env section so the Linux build runs without signing
and stays consistent with the other platforms.

- name: List build artifacts
shell: bash
run: |
echo "Build artifacts:"
find dist -type f -name "*" | head -20

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux-dev-artifacts
path: |
dist/*.AppImage
dist/*.deb
dist/*.yml
dist/*.yaml
dist/*.blockmap
retention-days: 30
if-no-files-found: warn

build-windows:
runs-on: windows-latest
if: ${{ inputs.platform == 'windows' }}

Comment on lines +167 to +169
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Mirror the timeout on Windows.

   build-windows:
     runs-on: windows-latest
+    timeout-minutes: 60
     if: ${{ inputs.platform == 'windows' }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
runs-on: windows-latest
if: ${{ inputs.platform == 'windows' }}
runs-on: windows-latest
timeout-minutes: 60
if: ${{ inputs.platform == 'windows' }}
🤖 Prompt for AI Agents
.github/workflows/dev-release.yml around lines 167 to 169: the Windows job block
lacks the timeout-minutes setting that other platform jobs use, so add the same
timeout-minutes value under this job (matching the timeout used for Linux/macOS
jobs) with correct YAML indentation so the Windows job is subject to the same
workflow timeout.

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Set version
if: ${{ inputs.version != '' }}
shell: bash
run: |
node -e "
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
pkg.version = '${{ inputs.version }}';
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
console.log(\`Version set to \${pkg.version}\`);
"

- name: Build Windows package
run: |
pnpm build
pnpm exec electron-builder --win --publish never
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ELECTRON_BUILDER_CHANNEL: dev

- name: List build artifacts
shell: bash
run: |
echo "Build artifacts:"
find dist -type f -name "*" | head -20

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: windows-dev-artifacts
path: |
dist/*.exe
dist/*.yml
dist/*.yaml
dist/*.blockmap
retention-days: 30
if-no-files-found: warn
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# [1.0.0-alpha.9](https://github.com/mkdir700/EchoPlayer/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2025-09-12)

### Bug Fixes

- **homepage:** Fix UI desynchronization issue after deleting video records + i18n support ([#120](https://github.com/mkdir700/EchoPlayer/issues/120)) ([7879ef4](https://github.com/mkdir700/EchoPlayer/commit/7879ef442b888d6956a74739c3c0c1c54bb87387))
- **player:** Fix subtitle navigation when activeCueIndex is -1 ([#119](https://github.com/mkdir700/EchoPlayer/issues/119)) ([b4ad16f](https://github.com/mkdir700/EchoPlayer/commit/b4ad16f2115d324aabd34b08b2a05ca98a3de101))
- **player:** Fix subtitle overlay dragging to bottom and improve responsive design ([#122](https://github.com/mkdir700/EchoPlayer/issues/122)) ([d563c92](https://github.com/mkdir700/EchoPlayer/commit/d563c924c9471caeeab45a3d2ddd6dda5520fcac))
- **player:** Prevent subtitle overlay interactions from triggering video play/pause ([#128](https://github.com/mkdir700/EchoPlayer/issues/128)) ([9730ba1](https://github.com/mkdir700/EchoPlayer/commit/9730ba1184cffe2012dd30e9207a562e88eec140))
- **ui:** Remove white border shadow from modal buttons in dark mode ([#124](https://github.com/mkdir700/EchoPlayer/issues/124)) ([29f70f6](https://github.com/mkdir700/EchoPlayer/commit/29f70f66806f3dc0e3e473a9b3b27867cf67ac0d))

### Features

- **performance:** implement video import performance optimization with parallel processing and warmup strategies ([#121](https://github.com/mkdir700/EchoPlayer/issues/121)) ([2c65f5a](https://github.com/mkdir700/EchoPlayer/commit/2c65f5ae92460391302c24f3fb291f386043e7cd))
- **player:** Implement fullscreen toggle functionality with keyboard shortcuts ([#127](https://github.com/mkdir700/EchoPlayer/issues/127)) ([78d3629](https://github.com/mkdir700/EchoPlayer/commit/78d3629c7d5a14e8bc378967a7f161135c5b5042))
- **scripts:** optimize FFmpeg download progress display ([#125](https://github.com/mkdir700/EchoPlayer/issues/125)) ([be33316](https://github.com/mkdir700/EchoPlayer/commit/be33316f0a66f7b5b2de64d275d7166f12f50379))

# [1.0.0-alpha.8](https://github.com/mkdir700/EchoPlayer/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2025-09-10)

### Features
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ pnpm test:ui

## 🙏 致谢

- [Cherry Studio](https://github.com/CherryHQ/cherry-studio) - 一款为创造而生的 AI 助手
| 项目名 | 简介 |
| --- | --- |
| [Cherry Studio](https://github.com/CherryHQ/cherry-studio) | 一款为创造而生的 AI 助手 |
| [DashPlayer](https://github.com/solidSpoon/DashPlayer) | 为英语学习者量身打造的视频播放器 |

---

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "echoplayer",
"version": "1.0.0-alpha.8",
"version": "1.0.0-alpha.9",
"description": "EchoPlayer is a video player designed for language learners, helping users learn foreign languages efficiently through sentence-by-sentence intensive listening.",
"main": "./out/main/index.js",
"author": "echoplayer.cc",
Expand Down
Loading